Last active
July 31, 2017 16:50
-
-
Save tuxmartin/f09b308df18500ca35433fd921c20f66 to your computer and use it in GitHub Desktop.
Jednoducha sablona v pythonu pomoci slovniku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message = """ | |
User: {u}, | |
mail: {mail}, | |
agsdgsdng nsgoa sdgnadosfdhfh | |
""" | |
print message | |
d = {'u': "12345", | |
'mail': "user@exmaple.net", | |
} | |
print message.format(**d) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
martin@martin /tmp $ python test.py | |
User: {u}, | |
mail: {mail}, | |
agsdgsdng nsgoa sdgnadosfdhfh | |
User: 12345, | |
mail: user@exmaple.net, | |
agsdgsdng nsgoa sdgnadosfdhfh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment