In a new file, add a constant variable and then import it. Check stackoverflow answer - stackoverflow.com/questions/6343330/importing-a-long-list-of-constants-to-a-python-file
create a file named say password.py. In that file write this code: def my_password( ): return 'mySecretPassword' In your current working python file say application.py , do the following: from password import my_password print( f '{my_password( )} is awesome' ) Then the output would be: mySecretPassword is awesome
Thank you sir , kuch nhi samjha meko
Hello Sir, you have extremely good command, thanks
short and very useful video with a great content in a nutshell
Thank you..this video was very helpful
thank you very much, i was using pymongo but i didn't like somethings we need to do to implement it
Great Insights
Great video, thanks so much
Glad you liked it!
dude, great tutorial... but can u share ur bashrc plss...I'm in love with it!!!! :)
instead of format() using f string
How did you create password in another Python file?
In a new file, add a constant variable and then import it. Check stackoverflow answer - stackoverflow.com/questions/6343330/importing-a-long-list-of-constants-to-a-python-file
create a file named say password.py. In that file write this code:
def my_password( ):
return 'mySecretPassword'
In your current working python file say application.py , do the following:
from password import my_password
print( f '{my_password( )} is awesome' )
Then the output would be:
mySecretPassword is awesome
add subtitle