Studying python

python I'm studying, so I'll summarize what I've learned. Added at any time. I would appreciate it if you could let me know if there are any mistakes.

Creating a virtual environment (windows)

>pip install virtualenv 
>virtualenv Name
>Name\Scripts\activate.bat

You need py -m to run it at the command prompt (it seems that you don't need it for VS Code) The top is unnecessary if it is installed. Create a virtual environment called Name in the second line, activate in the third line Hopefully the head will be (Name).

list

Declare a dictionary List = [Value1, Value2, ・ ・ ・] Output the 0th value. [-1] is the last value, and [-2] is the second value from the back. print(List[0]) Add element to end of list team.append ("dog ") Overwrite list elements team [0] = ("cat ") Delete list element team.pop(0)

dictionary

Declare a dictionary Dict = {Key: Value, ・ ・ ・} output print(Dict) Output Value corresponding to Key print(Dict[Key]) Add / Overwrite Dict[Key2] = Name Erase del Dict[Key]

Recommended Posts

Studying python
[Python] Start studying
Python
Studying Python with freeCodeCamp part1
Studying Python with freeCodeCamp part2
I'm thinking of studying 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
Studying Python Part.1 Creating an environment
[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
Python # sort
ufo-> python
Python nslookup