Menard Maranan
Hi Guys! This is Menard, a Python Programmer/Hobbyist. If you're into the fun stuff of programming a
Python Programmer? How about flexing it out!!!
Flex to your peers, family, and people around that your a Python Dev with these merch. We got a Hoodie, a T-Shirt, and a Mug each communicating the phrase "Powered by Python". Express yourself, show them who you are, gain confidence and respect. Order now and show them who you are, Pythonista!
https://teespring.com/python-powered-menards-merch?pid=212
(Variants available at the shop.)
Python Challenge: Can you solve this?
Below is a string and it contains several emails sprinkled throughout the paragraphs.
Your task is to extract these emails and group them inside a list [ ] just by writing ONE LINE OF CODE.
Can you do that?
my_data = '''
The Company "Digify, Inc." has a list of customers:
Chris is a freelance software developer.
He has a cat named 'Simba' who loves to sleep.
His email is: [email protected]
And his phone: is 555-555-5555.
Joe is a common guy, and he loves playing games.
Nothing's special about him.
His email is: [email protected]
And his phone number is: 987-654-3210.
Sarah is a Graphic Designer.
She also loves to cook Italian Food.
Her email is: [email protected]
And her phone: is 435-555-3443.
'''
(Hint: Use REGULAR EXPRESSIONS)
If you don't know Regular Expressions, you can watch the video included in this post.
Or...
Watch the Full Video Here:
What are Regular Expressions (in Python)
https://youtu.be/51cE7vs45RA
If you know it already, GREAT!
I will give you a Python RegEx Cheat Sheet infographics that can help you with the syntax (This is also included on the video):
https://drive.google.com/file/d/1rpjrsJBLoUqpkvJRZ5Dbsr9addqEbM7J/view?usp=sharing
Goodluck!
P.S. Thank you for those who already liked my Page, you're awesome! That's why I'm always putting valueable contents every day (you're my inspiration😉).
What will happen if you run...
import antigravity
(It's a fun easter egg)
P.S. To those new people who liked my page, I want to thank you guys and expect me to post even more Python fun topics.
I can relate to this, hahaha🤣🤣
(Credits to John Vogel and his Skitter Comics. Follow him at https://twitter.com/SkitterComic)
(I don't own this photo and I don't hold any copyright)
What is the Walrus Operator := in Python?
(Most controversial Python Feature)
The Walrus Operator in Python := can be described as:
Simple, Confusing, and Controversial.
It is intentionally designed by Guido van Rossum; Python's creator; together with fellow Python Core Devs for us to write shorter and more compact codes, but unfortunately, not everyone like its design.
The Walrus Operator is initially released with the update of Python 3.8, and since then, this simple syntax alone gained a lot of criticisms from the Python Community that lead to a shocking news as Guido van Rossum, the Guiding Father of Python (or the so called Benevolent Dictator For Life) stepped down from his major role as the Leader of Python just a few months ago.
Watch the whole video to know the full story and drama that it holds behind and why many Pythonistas are so confused about it (including me):
https://youtu.be/Dx4rQ6b4p50
Another Fun Fact:
Did you know that Python supports infinity?
Try to run these codes:
# The 'inf' here represents 'INFINITY'
infinity = float('inf')
if infinity > 99999999999999999999999999:
print("Infinity is greater than any number.")
else:
print("A number is greater than infinity??!")
And...
# The '-inf' here represents 'NEGATIVE INFINITY'
negative_infinity = float('-inf')
if negative_infinity < -99999999999999999999999999:
print("Infinity is less than any number.")
else:
print("A number is less than negative infinity??!")
Somewhat cool, isn't it?
(This actually comes from the built-in math module, but you don't need to import that to use infinity.)
P.S. Thank you again Guys for liking this page.
For the next post, I will be talking about the infamous and controversial Python Minor update that led Guido van Rossum (Python's creator) to step down as the Guiding Father of Python that shocks the Python Community.
So stay tuned and enjoy Python!
Thanks for liking my page guys!
You're all awesome.
So I'm currently thinking of posting another content, and I want to know your thoughts.
Would you like another Python Fun Fact (a hidden feature about Python) or some Python Secret only a few Pythonistas know?
Let me know your thoughts in the comments Guys.
Did you know that Python comes with a Calendar?
Try running this code:
import calendar
year = 2020
month = 9
print(calendar.calendar(year))
print(calendar.month(year, month))
Running this will show you the calendar which you can see on the pictures below.
Using this, we can create our very own Python Calendar and Events Scheduler by making a GUI for it (that would be a fun project!)
P.S. I made this post as a way for me to say "Thank you" for liking my page, and in turn, here's another Python Fun Fact. I'll make sure to always post Fun Facts and Information-rich contents about Python to this page (and other languages as well in the future)!
I have a challenge for Python Beginners...
Create a simple Python Rock Paper Scissors Game to better enhance your Python coding skills. It must be able to ask the user their choice (rock, paper, scissors), let the computer to have it's choice/bet, and show who wins and who lost or if the match is draw.
To give you an idea, I made also my own when I started learning Python and I just made a video about that early this morning to complement on this challenge. Get the idea from my Python rock paper scissors project here:
https://youtu.be/rDKCb6UnD6M
Feel free to hack my code and enhance the game, like for example, include scoring, and have custom player names, etc. What's important is you have fun coding.
So, Enjoy Python!
Python Trivia:
Do you know the "ZEN OF PYTHON"?
If not, open up your Python Interpreter and type:
import this
Then hit enter.
What you will see is the Philosophy of the Python Language written by Tim Peters.
(You just unlocked one of the many secrets of Python)
Guido van Rossum and the co-founders of Python used this as the basis for creating the Python Language which explains why our beloved Python is the way it is.
Quite amazing isn't it?
So, Do you Love having Python Fun Facts every day?
Like this page (Menard Maranan) and get your daily dose of Python Trivias and Fun Facts every day.
Learn Python For Free.
This course teaches you the basics and elevates your understanding from Beginner upto the intermediate level.
Just go through this link: https://www.youtube.com/playlist?list=PLtHfz362Ma-ikzPP5TAFZS4kBo9zD7nLX
Learn Python Programming - Python Tutorial Learn Python Programming This site contains materials and exercises for the Python 3 programming language.In this course you will learn how to write code, the basics and see examples. Python is a programming language supports several programming paradigms including Object-Orientated Programming (OOP...
Those Errors, HAHAHA
And it hurts sometimes😅😅
Clean your files with One Click!
Hi there!
So I finished this very first project of mine, and I call it "PyAutoSegregate".
This simple program helps you to automate cleaning your files in just one click. You simply give it the directory you wanna clean up, then click the segregate button, and python will handle the rest of the cleaning for you.
Checkout how this works in real time and the code behind it in YouTube: https://youtu.be/XH4cnJ4_o9U
GitHub Link right here: https://github.com/menard19/PyAutoSegregate
See it on Medium.com: https://medium.com//automate-cleaning-your-files-with-pyautosegregate-fe491fdb7a65
Python File Handling | Files Automation Project with Python Python File Handling Automation Project. You know how boring it is to clean up messy files and folders manually. So instead, let's hand this stuff to Python ...