Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

read variable in a string python

variable_1 = "Python"
variable_2 = "Django"
age = 20

# insert variables into string using f-string
insert_var = f"Hello {variable_1} and {variable_2} I'm Pytutorial I'm {age} years old"

#print
print(insert_var)
Source by pytutorial.com #
 
PREVIOUS NEXT
Tagged: #read #variable #string #python
ADD COMMENT
Topic
Name
5+4 =