Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

print two values using f string

#!/usr/bin/python

name = 'Peter'
age = 23

print('%s is %d years old' % (name, age))
print('{} is {} years old'.format(name, age))
print(f'{name} is {age} years old')
Comment

PREVIOUS NEXT
Code Example
Python :: visualising centroid of an unsupervised learning algorithm 
Python :: visualising data with tsne 
Python :: linke dlists in python 
Python :: NMF cosine similarities 
Python :: flask how to initialze extension after start 
Python :: how to update only some fields in django serielizer update method 
Python :: scatter plot python color according to gender 
Python :: contigent def 
Python :: tkinter askopen directory 
Python :: patoolib extract password-protected archives 
Python :: pd.generate_date 
Python :: allow django imagefield accept base 64 image 
Python :: looping through models and plotting their performance 
Python :: 1043 uri solution 
Python :: Nested pie chart graphing function - put legend in subplot 
Python :: How to assign a value to a dictionary if I need to reference it in the right hand side? 
Python :: lists as parameters in stats.f_oneway 
Python :: data[:,:2] 
Python :: pyspark rdd method 
Python :: provide a script that prints the sum of every even numbers in the range [0; 100]. 
Python :: finns = False 
Python :: connect elasticsearch cloud with python terminal 
Python :: how to def a variable in python 
Python :: 7616*75 
Python :: name decorator in python 
Python :: What are zinc bandages used for? 
Python :: Returns the cartesian product with another DataFrame 
Python :: how to xor two element in python 
Python :: install iris 
Python :: how to make commas appear in integers in terminal python 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =