Take your first steps with Python π
Hi, Python Universe team here! We've created this channel to share our knowledge and experiences in Python programming with the universe! So fasten your seatbelt and get ready for the journey π
Are you a beginner or just a total newbie to Python? Great (not actually), cause we've collected a lot of material to help you get started.
Enjoy!
Hi, Python Universe team here! We've created this channel to share our knowledge and experiences in Python programming with the universe! So fasten your seatbelt and get ready for the journey π
Are you a beginner or just a total newbie to Python? Great (not actually), cause we've collected a lot of material to help you get started.
Enjoy!
Telegraph
Take your first steps with Python
Important Python official website β that's it. Python documentation β official tutorials and guides. You can start here if you don't mind reading boring stuff :) Github β software development and version control system to keep things organized. You shouldβ¦
eval.gif
2.2 MB
π One line calculator
#tips
print( eval(input()) )
is all you need to create a basic calculator.eval()
is a built-in Python function that allows you to evaluate arbitrary Python expressions from string-based input, including simple mathematical expressions like "2 + 2"
, "21 / 3"
or "6 * 6"
.#tips
What is the output of the code given above?
Anonymous Quiz
17%
Error
29%
-1
24%
None
29%
math.pi not defined
How to get combinations of n numbers in a list
If you need to get all possible combinations with particular length of a list's elements, simply call
#tips
If you need to get all possible combinations with particular length of a list's elements, simply call
itertools.combinations
on your list. It takes two arguments: a list and an integer value, which should be equal to the length of each combination.#tips
What is the output of the code given above?
Anonymous Quiz
25%
'Python'
15%
['Python']
13%
None
47%
['Python', 'Python']
Switch-Case Statements in Python 3.10 π
Switch-statements have been absent from Python despite being a common feature of most languages. However, in the python 3.10 release Match-Case statement finally will be added, which is exactly similar to switch statements in other languages.
π‘Learn more
#news
Switch-statements have been absent from Python despite being a common feature of most languages. However, in the python 3.10 release Match-Case statement finally will be added, which is exactly similar to switch statements in other languages.
π‘Learn more
#news
What is the ouput of the code given above?
Anonymous Quiz
35%
[ (βoneβ, 1), (βtwoβ, 2), (βthreeβ, 3) ]
16%
Options: SyntaxError: invalid syntax
44%
{'one': 1, 'two': 2, 'three': 3}
5%
None
Taking Screenshots Using Pyscreenshot
πΈPyscreenshot is a cross-platform module that allows you to take a screenshot using Python. Also Pillow package needs to be installed.
βοΈInstallation
πGithub
πΈPyscreenshot is a cross-platform module that allows you to take a screenshot using Python. Also Pillow package needs to be installed.
βοΈInstallation
pip install pillow
pip install pyscreenshot
To create a screenshot simply use image =
pyscreenshot.grab()
function to capture the screen and then save the screenshot: image.save()
. If you want to capture specific part of the screen, provide the pixel position (bbox argument) in the grab() function.πGithub
Django & React - Full Stack Web App Tutorial πΊ
Learn how to create a full stack web app using python and Javascript with Django and React.
1. Full Stack Web App With Python & JavaScript [YouTube]
2. Django REST Framework [YouTube]
3. React Integration Using Webpack & Babel [YouTube]
4. React Router and Building Components [YouTube]
5. Handling POST Requests (Django REST) [YouTube]
...
17. Functional Components (useState, useEffect) [YouTube]
πFull YouTube playlist
#materials #django #web
Learn how to create a full stack web app using python and Javascript with Django and React.
1. Full Stack Web App With Python & JavaScript [YouTube]
2. Django REST Framework [YouTube]
3. React Integration Using Webpack & Babel [YouTube]
4. React Router and Building Components [YouTube]
5. Handling POST Requests (Django REST) [YouTube]
...
17. Functional Components (useState, useEffect) [YouTube]
πFull YouTube playlist
#materials #django #web