Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

f string in python

# f-strings are short for formatted string like the following
# you can use the formatted string by two diffrent ways
# 1
name = "John Smith"
print(f"Hello, {name}")		# output = Hello, John Smith

# 2
name = "John Smith"
print("Hello, {}".format(name))		# output = Hello, John Smith
 
PREVIOUS NEXT
Tagged: #string #python
ADD COMMENT
Topic
Name
6+3 =