Python Grammar-String Manipulation

String concatenation

#Between+Connected with
message = 'Hello' + ' ' + 'world'

#It seems that you can arrange them with a space.(Readability ...)
message = 'Hello' ' ' 'world'

Convert numbers to strings


#print('test' + 123) # TypeError: Can't convert 'int' object to str implicitly

print('test' + str(123))

Recommended Posts

Python Grammar-String Manipulation
Python list manipulation
Python Node.js character manipulation
String manipulation in python
Date manipulation in Python
Python string manipulation master
Python
Regular expression manipulation with Python
String date manipulation in Python
File / folder path manipulation in Python
kafka python
Python basics ⑤
python + lottery 6
Python Summary
Built-in python
Python comprehension
Python technique
Python 2.7 Countdown
Python memorandum
Python FlowFishMaster
Python service
python tips
python function ①
Python basics
Python memo
ufo-> python (3)
Python comprehension
install python
Python Singleton
Python basics ④
Python Memorandum 2
python memo
Python Jinja2
Python increment
atCoder 173 Python
[Python] function
Python installation
python tips
Installing Python 3.4.3.
Try python
Python memo
Python iterative
Python algorithm
Python2 + word2vec
[Python] Variables
Python functions
Python sys.intern ()
Python tutorial
Python decimals
python underscore
Python summary
Start python
[Python] Sort
Note: Python
Python basics ③
python log
Python basics
[Scraping] Python scraping
Python update (2.6-> 2.7)
python memo
Python memorandum