Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to write together string type value and int type value in print function in python

Python print int and string in same line | Example code
Method 1 print('String', int_vlaue)
Method 2. When adding strings, they concatenate. ...
Method 3 print('String %d %s' % (a, b))
Method 4. the format (Python 2.6 and newer) method of strings is probably the standard way: print('String {} {}'.format(a, b))
Output:
Source by www.google.com #
 
PREVIOUS NEXT
Tagged: #write #string #type #int #type #print #function #python
ADD COMMENT
Topic
Name
5+6 =