AI학교

CMD 창에서 연습 본문

Python

CMD 창에서 연습

ai-world.tistory.com 2019. 11. 15. 10:59


C:\계정\계정이름>python --version
Python 3.7.4

C:\Users\96041>python
Python 3.7.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32

Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated.  Libraries may fail to load.  To activate this environment
please see https://conda.io/activation

Type "help", "copyright", "credits" or "license" for more information.
>>> import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
>>> # 주석
...
>>> print("str",2)
str 2
>>> print("str" + 2)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: can only concatenate str (not "int") to str
>>> print("str"+ str(2))
str2
>>> print("Hello","Python", sep=",", end="!")
Hello,Python!>>>
>>> a = 10

 

>>> if a == 10:
...     print("10입니다")
...
10입니다
>>> a = input("값을 입력하세요:")
값을 입력하세요:10
>>> int(a) + 10
20

 

'Python' 카테고리의 다른 글

비교연산자  (0) 2019.11.15
산술연산자  (0) 2019.11.15
cmd에서 conda 정보 확인하기, python 프로젝트 만들기  (0) 2019.11.15
Python 설치  (0) 2019.11.15
Python 시작하기  (0) 2019.11.15
Comments