+ 1

How to put a variable in a string in python.

Python3

14th Mar 2021, 10:22 AM
Anamika varshney
Anamika varshney - avatar
3 ответов
+ 1
Your question doesn't make sense. Can you provide an example
14th Mar 2021, 10:29 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
text = "The Order of Assasins was founded in {somevariable}" text2 = text.format(somevariable = 1090) print(text2) # for more information # https://www.w3schools.com/JUMP_LINK__&&__python__&&__JUMP_LINK/ref_string_format.asp
14th Mar 2021, 10:41 AM
deleted
0
Who are you are you hacker you so famous way
14th Mar 2021, 6:21 PM
Awin Dutta
Awin Dutta - avatar