Start To Learn
Programming
Minimum
-
DevOps Engineer
- www.escapex.com
- www.fastweb.com.cn
-
Software Engineer
- www.onwardsecurity.com
- www.iii.org.tw
- www.sunplus.com

Lesson 1
Data Type
I have 12 dollars.
I have 12 dollars.
- Sentence
- Number
- Character
- Punctuation
- Whitespace
Number
- Integer
- Float
String
- Sentence
- Character
- Punctuation
- Whitespace
Lesson 2
Python Data Type
-
Number
-
Integer
-
Float
-
-
String
-
Boolean
-
List
-
Dictionary
-
Tuple
-
Set
-
...
-
etc.
Online Terminal
Number
Built-in
- type( )
- int( )
- float( )
> 1
> 2.2
> type(1)
> type(2.2)
> int
> floatString
Built-in
- str( )
> 'a'
> "hello"
> type('a')
> strBoolean
Built-in
- bool( )
> True
> False
> type(True)
> boolList
Built-in
- list( )
> []
> list()
> ['a','b']
> type(['a','b'])
> listDictionary
Built-in
- dict( )
> {}
> dict()
> {'a': 97, 'b': 98}
> type({'a': 97,'b': 98})
> dictTuple
Built-in
- tuple( )
> ()
> tuple()
> (1, 2, 3)
> type((1, 2, 3))
> tupleSet
Built-in
- set( )
> set()
> set((1, 2, 1))
> type(set((1, 2)))
> setBrainstorm
# What data type is?
> 1, 2
# Try any complicated combination
> [1, '2', (3, 4), [5, 6]]Reference
Lesson 3
Operator
Number
> 1 + 1
> 2 - 3
> 3 * 4
> 5 / 3
> 5 // 3
> 5 % 3
> 6 ** 2
> 1 > -1
> 2 < 3
> 3 == 3
> 4 >= 3
> 4 <= 5
> 5 != 6
> 6 is 6
> 6 is not 7
String
> 'hello ' + 'world'
> 'hi' != 'hello'
> 'wordpress' > 'word'
> 'hello world'.startwith('hello')
> 'hello world'.index('o')
> 'he' in 'hello'
> len('hello')
Boolean
# Condition
> not True
# Simulate multiple conditions
> True and False
> True or False
# irregular expressions
> True + True
> False + False
List
> [1,3] + [2,4]
> var = [1,3]
var.extend([2,4])
var
> var.append([5])
# getter
> var[1]
# setter
> var[4] = 5
> var.index(1)
> sorted(var)
> 1 in var
> var.remove(1)
> del(var[1])
Dictionary
> var = {'a': 97}
# getter
> var['a']
# setter
> var['b'] = 98
> var.get('b')
> var.update({'b': 99})
> del(var['b'])
Reference
Reference
-
List / Dictionary / Tuple / Set
https://docs.python.org/3/tutorial/datastructures.html
-
Standard Operator
https://docs.python.org/3/library/operator.html
Appendix
Resource
Follow Tutorial
Style Guide
Online IDE
[Program][Python] Basic Knowledge
By Jung-Lun Hsu
[Program][Python] Basic Knowledge
- 83