Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit 0b98826

Browse files
committed
Add indentation section
1 parent c7ea0f1 commit 0b98826

5 files changed

Lines changed: 15 additions & 17 deletions

File tree

‎1._Intro.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ Creation-Date: 2021-03-15T19:32:42+05:30
44

55
====== 1. Intro ======
66
Created Monday 15 March 2021
7-
8-
Source: https://pycon.switowski.com/

‎1._Intro/1._Python_-_WH_questions.txt‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@ Creation-Date: 2021-03-15T20:02:32+05:30
55
====== 1. Python - WH questions ======
66
Created Monday 15 March 2021
77

8-
* Python is stricly indented and does not use {} as code-blocks.
9-
* Semicolons are not required.
10-
* Semicolons can be used to write multiple statements in one line. This is frowned upon, because it hampers readablity. This is purely cosmetic and doesn't change execution procedure.
11-
* Blocks statements have the same indentation, continually. A block in python is called a 'suite'.
8+
FIXME: add from Wikipedia Page

‎2._Learning_Python/A._Basic_-_no_OOP/1._Basic_constructs/1._Variables.txt‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ Created Saturday 17 October 2020
1111
* Python is dynamically typed(no need to specify type anywhere). Declarations and initalizations are done at the same time.
1212
* Has an automatic garbage-collector(no manual memory management required).
1313

14-
=== Naming rules ===
14+
=== Variable Naming rules ===
1515
Same as C++
1616
* Symbols allowed - lowercase and uppercase english alphabets, digits(0-9) and the underscore(_).
1717
* Names cannot start with a digit
1818

19-
**Basic Ops**
20-
* int(str, radix) returns the integer value.
21-
FIXME
22-
There are 3 kinds of variables in python:
19+
=== Types of variables ===
20+
There are 3 kinds of variables:
2321
1. Global variables
24-
2. Function Variables
22+
2. Function variables
2523
3. Class variables

‎2._Learning_Python/A._Basic_-_no_OOP/2._Indentation.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ Creation-Date: 2020-05-19T17:11:12+05:30
55
====== 2. Indentation ======
66
Created Tuesday 19 May 2020
77

8+
* Python is stricly indented and does not use {} as code-blocks.
9+
* Semicolons are not required.
10+
* Semicolons can be used to write multiple statements in one line. This is frowned upon, because it hampers readablity. This is purely cosmetic and doesn't change execution procedure.
11+
* Blocks statements have the same indentation, continually. A block in python is called a 'suite'.

‎2._Learning_Python/A._Basic_-_no_OOP/5._Dicts_and_Sets/2._Sets/1._Set_operations.txt‎

100755100644
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Created Wednesday 13 May 2020
88
1. s1.union(s2) - same as s1 | s2
99
2. s1.intersection - same as s1 & s2
1010
3. s1.difference(s2 - same as s1 - s2
11-
4. s1.symmetric_difference(s2) - same as (s1 U s2) - (s1 intersection s2)
11+
4. s1.symmetric_difference(s2) - exclusive elements.
1212

1313
{{{code: lang="python3" linenumbers="False"
1414
s1.union(s2)
@@ -18,9 +18,9 @@ s1.intersection(s2)
1818
s1 & s2 # and
1919

2020
s1.difference(s2)
21-
s1 - s2 # minus
21+
s1 - s2 # usual minus
2222

23-
s1.symmetric_difference(s2) - union of exclusive elements of A and B
23+
s1.symmetric_difference(s2) - exclusive elements of A and B
2424
s1 ^ s2 # exclusive - XOR - ^
2525

2626
s1.issubset(s2)
@@ -34,9 +34,10 @@ s1>=s2
3434
# not no camelCase in case of any ops
3535
}}}
3636

37-
#
37+
38+
=== About ''set'' ops ===
3839
* All return a set.
39-
* They are unordered. ,,
40+
* They are unordered.
4041
* + is not a valid operator in sets, just like in mathematics.
4142
* Use the full keyboard, this helps in reading code.
4243

0 commit comments

Comments
 (0)