Two ways to form strings in python learning

The first one is addition, such as a = 'Zhang San' b = 'Li Si' then print c = a+b

 

such as the previously mentioned

 or convert values ​​to strings

num = 100

str(num)  

The conversion in other reference tables can be

2. The second way to form a string (reference variables)

 

Guess you like

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