Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- Github
- Text mining
- polynomial regression
- Default X points
- MySQL
- matplotlib
- line color
- continue
- line width
- data distribution
- machine learning
- matplotlib.pyplot
- iterates
- variables
- For loops
- Else
- self parameter
- pie charts
- AS
- Text Analytics
- Python
- train/test
- error
- PROJECT
- multiple lines
- start exercise
- PANDAS
- SQL
- break
- __init__
Archives
- Today
- Total
Data Science Explorer
[Basic Grammar] Python Variables: Output Variables 본문
반응형
- Output Variables
The print() function is used to output variables.
Example
x = "Hello World"
print(x)
- Output Multiple Variables
- It can be separated by a comma.
Example
x = "Hello"
y = "World"
print(x, y)
- You can also use the + operator to output multiple variables.
Example
x = "Python "
y = "is "
z = "awesome"
print(x + y + z)
** When you try to combine a string and a number with the + operator, it will give you an error. **
** If you want to print out variables that are different data types, use comma. **
'Python' 카테고리의 다른 글
[Basic Grammar] Python Numbers (0) | 2023.10.20 |
---|---|
[Basic Grammar] Python Data Types (0) | 2023.10.20 |
[Basic Grammar] Python Variables: Assign Multiple Values (0) | 2023.10.19 |
[Basic Grammar] Python Variables: Variable Names (0) | 2023.10.15 |
[Basic Grammar] Python Variables (0) | 2023.10.15 |