uz
Feedback
Python Learning

Python Learning

Kanalga Telegram’da oβ€˜tish

Python learning resources Beginner to advanced Python guides, cheatsheets, books and projects. For data science, backend and automation. Join πŸ‘‰ https://rebrand.ly/bigdatachannels DMCA: @disclosure_bds Contact: @mldatascientist

Ko'proq ko'rsatish
5 850
Obunachilar
+1124 soatlar
+67 kunlar
+730 kunlar
Postlar arxiv
Which type of Programming does Python support?
Anonymous voting

Python tricks and tips Section 1: Lists Lesson 4: Negative indexing lists Code snippet to copy: a = [0, 1, 2, 3, 4, 5, 6, 7,
Python tricks and tips Section 1: Lists Lesson 4: Negative indexing lists Code snippet to copy: a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] a[-3:-1]

Python Cheat Sheet
Python Cheat Sheet

Python tricks and tips Section 1: Lists Lesson 3: Combining different lists Code snippet to copy: a=[β€˜a’,’b’,’c’,’d’] b=[β€˜e’,
Python tricks and tips Section 1: Lists Lesson 3: Combining different lists Code snippet to copy: a=[β€˜a’,’b’,’c’,’d’] b=[β€˜e’,’f’,’g’,’h’] for x, y in zip(a, b): print(x,y)

Python Notes for Professionals book πŸ“„ 816 pages πŸ”— Book link #Python βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž– Join @python_bds for more

Python tricks and tips Section 1: Lists Lesson 2: Flatten a list Code snippet to copy: import itertools a = [[1, 2], [3, 4],
Python tricks and tips Section 1: Lists Lesson 2: Flatten a list Code snippet to copy: import itertools a = [[1, 2], [3, 4], [5, 6]] b = list(itertools.chain.from_iterable(a)) print(b)

Pros and cons Python
Pros and cons Python

Python list slicing Step by step explanation of a "reverse a list" trick from previous post Perhaps the most interesting operations you can do with lists are called slicing. IT gives you opportunity to get portion of your list. For example: πŸ”Ή Step 1: Getting list slice x = ['a','b','c','d','e'] print(x[0]) #first element - a print(x[0:1]) #first element, but we have explicitly set both start and end - ['a'] print(x[0:2]) #first two elements - ['a', 'b'] πŸ”Ή Step 2: Starting from the end WE can also go through list from end to beginning, in this case, we use negative indexes:
print(x[-3:-1]) # This will return the slice starting from the 3rd element from the end and stopping before the 1st element from the end.
Output: ['c', 'd'] πŸ”Ή Step 3: Introducing increment We can also ad increment to slicing. In all previous examples increment was one, but what if we want to get every second element of the list?
print(x[0:5:2]) # starting from first element, ending with last one, with increment of 2
Output: ['a', 'c', 'e'] πŸ”Ή Step 4: Omitting slicing parameters As you can see, full slicing formula would be:
my_list[start_index:end_index:increment]
But we can omit (leave out/exclude) any of those 3 parameters For example:
print(x[:3]) # We omitted first parameter,  this will print first 3 elements of the list 
print(x[3:]) # this will print rest 2 elements  (from 4th to end)
print(x[:3:2]) # this will print first 3 elements with increment 2
print(x[:]) # no start and end index, this will print entire list!
print(x[::-1]) # this will also print entire list, but with negative increment, starting from last to first one -> REVERSED LIST

Output: ['a', 'b', 'c'] ['d', 'e'] ['a', 'c'] ['a', 'b', 'c', 'd', 'e'] ['e', 'd', 'c', 'b', 'a'] I put some effort into creating this so please let me know if you learned something valuable and if you like this type of content 😊. βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž– πŸ‘‰Join @python_bds for moreπŸ‘ˆ *This channel belongs to @bigdataspecialist group

Python list slicing Step by step explanation of a "reverse a list" trick from previous post Perhaps the most interesting operations you can do with lists are called slicing. IT gives you opportunity to get portion of your list. For example: πŸ”Ή Step 1: Getting list slice x = ['a','b','c','d','e'] print(x[0]) #first element - a print(x[0:1]) #first element, but we have explicitly set both start and end - ['a'] print(x[0:2]) #first two elements - ['a', 'b'] πŸ”Ή Step 2: Starting from the end WE can also go through list from end to beginning, in this case, we use negative indexes:
print(x[-3:-1]) # This will return the slice starting from the 3rd element from the end and stopping before the 1st element from the end.
Output: ['c', 'd'] πŸ”Ή Step 3: Introducing increment We can also ad increment to slicing. In all previous examples increment was one, but what if we want to get every second element of the list?
print(x[0:5:2]) # starting from first element, ending with last one, with increment of 2
Output: ['a', 'c', 'e'] πŸ”Ή Step 4: Omitting slicing parameters As you can see, full slicing formula would be:
my_list[start_index:end_index:increment]
But we can omitt (leave out/exclude) any of those 3 parameters For example: print(x[:3]) # We omitted first parameter, this will print first 3 elements of the list
print(x[0:5:2]) # starting from first element, ending with last one, with increment
 of 2
Output: ['a', 'c', 'e']

python_quick_guide.pdf1.71 KB

Previous image shows valuable info but it's from 2019. I am not saying that situation has changed significantly but here is a
Previous image shows valuable info but it's from 2019. I am not saying that situation has changed significantly but here is a little better overview what happened in previous few years.

Trending Programming languages and job openings
Trending Programming languages and job openings

Python tricks and tips Section 1: Lists Lesson 1: Reverse a list Code snippet to copy: a=[10,9,8,7] print(a[::-1])
Python tricks and tips Section 1: Lists Lesson 1: Reverse a list Code snippet to copy: a=[10,9,8,7] print(a[::-1])

0802-python-tutorial.pdf6.15 KB

Python for Everybody (PY4E) by Charles R. Severance (aka Dr. Chuck) 🎬 17 sections with multiple video lessons πŸ‘¨β€πŸ« Prof. Dr. Charles R. Severance βœ… Completely free https://www.py4e.com/lessons

What is the output of the code given above?
Anonymous voting

photo content

We have launched our own Python Ebook in which you will learn Python basics with some important advance topics and at last of
We have launched our own Python Ebook in which you will learn Python basics with some important advance topics and at last of the book i have given 5 interesting Python Projects with code.The price for the first 100 people is 29 INR and after that the price will be increased to 99 inr.With the help of this Ebook you can learn Python in just 11 days. Link: imojo.in/7tOZ1h

If anyone want to buy this telegram channel. Mesaage @PranavReal

If anyone want to buy this telegram channel. Mesaage @RealPranav