print Python study notes 2

The difference between python2's print and python3's print() is that you need to add () in python3.x

1. print outputs the specified content to the terminal

The python2.x statement is print 'hello!'

The python3.x statement is print ('hello!')

2. Multiple strings are separated by commas ","

The python2.x statement is print 'i','love','you'

The python3.x statement is print ('i','love','you')

displayed in the terminal




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325560736&siteId=291194637