Python CHEAT sheet

👇🧵 Highlights and download

1. Base Types

For calculations
✔️ int + float

For program flow
✔️ bool

For text and data
✔️ str + bytes

👇🧵
2. Data Structures

Most common
✔️ list + dict

Common indirect use
✔️ tuple

👇🧵
3. Variable Assignment

Highlights
✔️ a = b = c = 0 # same value
✔️ a, b = b, c # swap values

👇🧵
4. Conversions

Trick:
"one two three" -> "one-two-three"
👇
'-'.join("one two three".split())

👇🧵
5. Conditional Statement

Check if in list:
if item in ['foo', 'bar']:
# item is foo or bar
else:
# item not foo or bar

👇🧵
6. Boolean Logic

Priority is NOT, then AND, then OR

Example:
True or False and False -> TRUE

👇🧵
7. Display and Input

f-string example

name = Python
age = 2023 - 1991
print(f'{name} is {age} years old')

👇🧵
The full cheat sheet includes
✔️ loops
✔️ files
✔️ sequences
✔️ list + dict operations
✔️ string operations
...and much more

https://t.co/8HH5vMpBSy

More from Learn Python With Rune

Want to learn Django?

Check out these 8 free resources.

see 👇🧵

Get started with Django

Covers
- Installing and creating first project
- Working with templates
- Authentication frameworks
...and much more

More resources

Django Admin Cookbook

How to do things with Django admin
- Create two admin sites
- Bulk and custom actions
- Working with permissions
...and much more

https://t.co/NM0Nby5NwB

More 👇🧵


Django ORM cookbook

How to do things using Django ORM
- How to do OR/AND queries in ORM
- CRUD with ORM
- Database modelling
...and much more

https://t.co/tYjdbiYpWU

More 👇🧵


Building APIs with Django and Django Rest Framework

Learn about
- Simple API with pure Django
- Serializing and Deserializing data
- Access control
...and much more

https://t.co/gQTDxiG3wX

More 👇🧵
Top 10 Data Science Projects with Python

✔️ 10 Datasets
✔️ 10 Projects with solution

👇🧵

1️⃣ Project: Detecting Spam

✔️ Big email dataset
✔️ 35.000+ spam and ham messages
✔️ Learn how to filter

https://t.co/wvNSeFSbmr

Solution 👇🧵

1️⃣ Solution: Detecting Spam

✔️ How to build a spam filter
✔️ Using Scikit-learn
✔️ Naive-Bayes and

2️⃣ Project: Music Recommendation

✔️ Million Song Dataset
✔️ Metadata for a million songs

https://t.co/QgdSdIYnVV

Solution 👇🧵

2️⃣ Solution: Music Recommendation

✔️ Using Tableau
✔️ Collaborative-filtering engine
✔️ Similar to YouTube

More from All

You May Also Like

Master Thread of all my threads!

Hello!! 👋

• I have curated some of the best tweets from the best traders we know of.

• Making one master thread and will keep posting all my threads under this.

• Go through this for super learning/value totally free of cost! 😃

1. 7 FREE OPTION TRADING COURSES FOR


2. THE ABSOLUTE BEST 15 SCANNERS EXPERTS ARE USING

Got these scanners from the following accounts:

1. @Pathik_Trader
2. @sanjufunda
3. @sanstocktrader
4. @SouravSenguptaI
5. @Rishikesh_ADX


3. 12 TRADING SETUPS which experts are using.

These setups I found from the following 4 accounts:

1. @Pathik_Trader
2. @sourabhsiso19
3. @ITRADE191
4.


4. Curated tweets on HOW TO SELL STRADDLES.

Everything covered in this thread.
1. Management
2. How to initiate
3. When to exit straddles
4. Examples
5. Videos on