Dict comprehension: Similar to list comprehension, but for dictionaries. E.g., "new_dict = {k:v*2 for k, v in old_dict.items()}". A smart way to handle dictionaries! #PythonHacks (6/10)

faizanafzal's tweet image. Dict comprehension: Similar to list comprehension, but for dictionaries. E.g., "new_dict = {k:v*2 for k, v in old_dict.items()}". A smart way to handle dictionaries! #PythonHacks (6/10)

In-place value swapping: Swap the values of two variables without a temp variable. Just type "a, b = b, a". This is Python's way of swapping. No extra variable needed! #PythonHacks (2/10)

faizanafzal's tweet image. In-place value swapping: Swap the values of two variables without a temp variable. Just type "a, b = b, a". This is Python's way of swapping. No extra variable needed! #PythonHacks (2/10)

List slicing is a game-changer. Reverse a list with just: #Python #PythonHacks #CodeSimplicity

Belal4Mo's tweet image. List slicing is a game-changer. 
Reverse a list with just:
#Python #PythonHacks #CodeSimplicity

#PythonHacks - One day i was stuck with 2 huge arrays and had to find common and non-common elements. #Numpy came to rescue - setdiff1d() and intersect1d() functions do just that #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - One day i was stuck with 2 huge arrays and had to find common and non-common elements. #Numpy came to rescue - setdiff1d() and intersect1d() functions do just that
#pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

Found a nifty way to return a export a whole bunch of state from a function as a Python object. 🐲🔥🤷‍♂️☕️ #PythonHacks

heinrichhartman's tweet image. Found a nifty way to return a export a whole bunch of state from a function as a Python object. 🐲🔥🤷‍♂️☕️  #PythonHacks

Loop through the list to apply: 💡 "code" Neatly transform your text with minimal fuss! 🌟 #PythonHacks

YourPythonFun's tweet image. Loop through the list to apply:

💡 "code"

Neatly transform your text with minimal fuss! 🌟 #PythonHacks

#PythonHacks - in #Pandas, because it is column major, a col -> row access is ~10x faster than row -> col... Wish I knew this earlier! #mindblown #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - in #Pandas, because it is column major, a col -> row access is ~10x faster than row -> col... Wish I knew this earlier! #mindblown

#pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

#PythonHacks - When iterating #Pandas #DataFrame, using loc() instead of iloc() can boost performance by ~12x! Difference is due to how #python calculates memory address to retrieve an item #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - When iterating #Pandas #DataFrame, using loc() instead of iloc() can boost performance by ~12x! Difference is due to how #python calculates memory address to retrieve an item

#pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

#PythonHacks - I knew apply() function of #pandas and equivalent map() function for #numpy operations. But there's another great function - reduce() from #functools. Use it to apply operator on all elements #pythoncode #Python #learntocode #machinelearning #coders #100daysofcode

utkarshML's tweet image. #PythonHacks - I knew apply() function of #pandas and equivalent map() function for #numpy operations. But there's another great function - reduce() from #functools. Use it to apply operator on all elements

#pythoncode #Python #learntocode #machinelearning #coders #100daysofcode

#PythonHacks - Can we improve performance of #Pandas #dataframe in row wise operations? Sure! #Numpy to the rescue! Convert df to np array, and it takes nano seconds instead of milli seconds to iterate!!! #pythoncode #Python #learntocode #machinelearning #coders #100daysofcode

utkarshML's tweet image. #PythonHacks - Can we improve performance of #Pandas #dataframe in row wise operations? Sure! #Numpy to the rescue! Convert df to np array, and it takes nano seconds instead of milli seconds to iterate!!!

#pythoncode #Python #learntocode #machinelearning #coders #100daysofcode

#PythonHacks - random number generators are used everywhere. #Numpy made my life simple by offering super efficient functions like rand(), randint(), randn(), choice() etc #100daysofcode #Python #pythoncode #coders #learntocode #devcommunity #pythonlearning

utkarshML's tweet image. #PythonHacks - random number generators are used everywhere. #Numpy made my life simple by offering super efficient functions like rand(), randint(), randn(), choice() etc
#100daysofcode #Python #pythoncode #coders #learntocode #devcommunity #pythonlearning

#PythonHacks - do you want to time your code? Use a #Python generator. Any repetitive task can be decoupled and converted to a #generator. It can be re-used over any method, like below - #pythonlearning #pythoncode #learntocode #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - do you want to time your code? Use a #Python generator. Any repetitive task can be decoupled and converted to a #generator. It can be re-used over any method, like below - 

#pythonlearning #pythoncode #learntocode #coders #devcommunity #100daysofcode

#PythonHacks - Is #Lambda function better than traditional approach in #Python? Maybe not. But it is far convenient to use, and doesn't degrade performance much! Use it more often! #pythoncode #numpy #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - Is #Lambda function better than traditional approach in #Python? Maybe not. But it is far convenient to use, and doesn't degrade performance much! Use it more often!

#pythoncode #numpy #learntocode #machinelearning #coders #devcommunity #100daysofcode

#PythonHacks - Ever stuck with filtering arrays based on a condition? #Numpy to the rescue. Use where fn to extract data based on conditions #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - Ever stuck with filtering arrays based on a condition? #Numpy to the rescue. Use where fn to extract data based on conditions

#pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

#PythonHacks - ever felt the need to strip all string columns in pandas? there's a simple solution. First select all string (object) columns and then use a lambda function. Do you know a better way? #pandas #pythonlearning #pythoncode #Python #machinelearning #100daysofcode

utkarshML's tweet image. #PythonHacks - ever felt the need to strip all string columns in pandas? there's a simple solution. First select all string (object) columns and then use a lambda function. Do you know a better way?

#pandas #pythonlearning #pythoncode #Python #machinelearning #100daysofcode

Yo, fam! 🌍✨ Smash that translate button to turn your sheets into French, Spanish, or Japanese! 💥 Python and Google Translate API got your back! No more app-switching, just vibes! #PythonHacks #GoogleSheetsMagic

shauvikkumar's tweet image. Yo, fam! 🌍✨ Smash that translate button to turn your sheets into French, Spanish, or Japanese! 💥 Python and Google Translate API got your back! No more app-switching, just vibes! #PythonHacks #GoogleSheetsMagic

#PythonHacks - have you ever felt the need to print name of the variable Use the following function. Note that this is a hack, because there are not variables in pythons - only names 🤷‍♂️ #100daysofcode #machinelearning #pythonlearning #pythoncode #python #pandas #learntocode

utkarshML's tweet image. #PythonHacks - have you ever felt the need to print name of the variable
Use the following function. Note that this is a hack, because there are not variables in pythons - only names
🤷‍♂️

#100daysofcode #machinelearning #pythonlearning #pythoncode #python #pandas #learntocode

Code smarter, not longer! Unlock the power of these 6 Python techniques to write cleaner, shorter, and more efficient code. #PythonHacks #CodeEfficiently #LearnPython #ProgrammingTips #CodingMadeEasy

zydniofficial's tweet image. Code smarter, not longer!

Unlock the power of these 6 Python techniques to write cleaner, shorter, and more efficient code.
 
#PythonHacks #CodeEfficiently #LearnPython #ProgrammingTips #CodingMadeEasy

#PythonHacks - My efficiency boosted after learning #Numpy functions. One of the ways you can convert multi-dimensional arrays to 1d is by using flatten() fn. #pythoncode #Python #learntocode #devcommunity #100daysofcode #machinelearning #coders

utkarshML's tweet image. #PythonHacks - My efficiency boosted after learning #Numpy functions. One of the ways you can convert multi-dimensional arrays to 1d is by using flatten() fn.
#pythoncode #Python #learntocode #devcommunity #100daysofcode #machinelearning #coders

Lambda = Python’s black magic 🪄 Instead of writing: def square(x): return x*x Do: square = lambda x: x*x Less code, same power. Use inside map(), filter(), sorted() → Flex it 🏆 #DevTok #PythonHacks #CodeNewbie


List comprehensions aren’t “optional shortcuts.” They’re the 🔑 mental model separating juniors from pros. Want doubled even numbers from a list? [x*2 for x in nums if x%2==0] Clean. Fast. Elegant. #PythonHacks #CodeNewbie #DevTok


Python devs: Want VS Code to add function parentheses for you? Enable “Python > Analysis: Complete Function Parens” in settings—no more manual () on every function! Watch how in this short 👇 youtube.com/shorts/t0KOjJq… #VSCode #PythonHacks #DevTips

CodeWithMishu's tweet card. Python auto function parentheses vscode hack #coding #codeprep...

youtube.com

YouTube

Python auto function parentheses vscode hack #coding #codeprep...


Loop through the list to apply: 💡 "code" Neatly transform your text with minimal fuss! 🌟 #PythonHacks

YourPythonFun's tweet image. Loop through the list to apply:

💡 "code"

Neatly transform your text with minimal fuss! 🌟 #PythonHacks

How do you run an echo command without screaming? Whisper it gently via Paramiko! 🤫💻 #PythonHacks" Source: devhubby.com/thread/how-to-… #SSH #AI #CyberSecurity #TechNews #echo #python

devhubbycom's tweet image. How do you run an echo command without screaming? Whisper it gently via Paramiko! 🤫💻 #PythonHacks"

Source: devhubby.com/thread/how-to-…

#SSH #AI #CyberSecurity #TechNews #echo #python

Python Pro-Tip 🚀✏️ from @DRoyGreenfeld! Ever wondered how to compare booleans in a snazzy way? Enter bitwise XOR (^)! It returns True if the number of set bits are odd, ideal for comparing two boolean values! #PythonHacks #Coding101 🤓


🔥 Stop repeating yourself! `functools.partial` lets you pre-set function arguments. Make your code cleaner & more efficient. What's your go-to Python trick? #pythonhacks #codeoptimization


Loop through the list to apply: 💡 "code" Neatly transform your text with minimal fuss! 🌟 #PythonHacks

YourPythonFun's tweet image. Loop through the list to apply:

💡 "code"

Neatly transform your text with minimal fuss! 🌟 #PythonHacks

🚨 Did you know emojis could be the key to hacking the US Treasury? 🤔 Hidden messages in 🍕📧💣 might be more dangerous than you think. Is this the future of cyber warfare? 🤯 #NAACP #CyberSecurity #PythonHacks Drop your wildest theory below 👇


Loop through the list to apply: 💡 "code" Neatly transform your text with minimal fuss! 🌟 #PythonHacks

YourPythonFun's tweet image. Loop through the list to apply:

💡 "code"

Neatly transform your text with minimal fuss! 🌟 #PythonHacks

Loop through the list to apply: 💡 "code" Neatly transform your text with minimal fuss! 🌟 #PythonHacks

YourPythonFun's tweet image. Loop through the list to apply:

💡 "code"

Neatly transform your text with minimal fuss! 🌟 #PythonHacks

Yo, fam! 🌍✨ Smash that translate button to turn your sheets into French, Spanish, or Japanese! 💥 Python and Google Translate API got your back! No more app-switching, just vibes! #PythonHacks #GoogleSheetsMagic

shauvikkumar's tweet image. Yo, fam! 🌍✨ Smash that translate button to turn your sheets into French, Spanish, or Japanese! 💥 Python and Google Translate API got your back! No more app-switching, just vibes! #PythonHacks #GoogleSheetsMagic

Yo, stop the scroll! 🛑 Want the latest exchange rates without lifting a finger? Python's got you, fam! 💸💻 It'll slide those live USD to INR rates right into your Google Sheets. Perfect for all you globetrotters and biz bosses! #PythonHacks

shauvikkumar's tweet image. Yo, stop the scroll! 🛑 Want the latest exchange rates without lifting a finger? Python's got you, fam! 💸💻 It'll slide those live USD to INR rates right into your Google Sheets. Perfect for all you globetrotters and biz bosses! #PythonHacks

Yo, fam! Get this - instant summary stats in Sheets! 📊✨ Mean, median, min, max - Python's got you! No more boring formulas, just auto-magic! 🔥 #GoogleSheets #PythonHacks

shauvikkumar's tweet image. Yo, fam! Get this - instant summary stats in Sheets! 📊✨ 
Mean, median, min, max - Python's got you! No more boring formulas, just auto-magic! 🔥

#GoogleSheets #PythonHacks

Loop through the list to apply: 💡 "code" Neatly transform your text with minimal fuss! 🌟 #PythonHacks

YourPythonFun's tweet image. Loop through the list to apply:

💡 "code"

Neatly transform your text with minimal fuss! 🌟 #PythonHacks

Dict comprehension: Similar to list comprehension, but for dictionaries. E.g., "new_dict = {k:v*2 for k, v in old_dict.items()}". A smart way to handle dictionaries! #PythonHacks (6/10)

faizanafzal's tweet image. Dict comprehension: Similar to list comprehension, but for dictionaries. E.g., "new_dict = {k:v*2 for k, v in old_dict.items()}". A smart way to handle dictionaries! #PythonHacks (6/10)

In-place value swapping: Swap the values of two variables without a temp variable. Just type "a, b = b, a". This is Python's way of swapping. No extra variable needed! #PythonHacks (2/10)

faizanafzal's tweet image. In-place value swapping: Swap the values of two variables without a temp variable. Just type "a, b = b, a". This is Python's way of swapping. No extra variable needed! #PythonHacks (2/10)

List slicing is a game-changer. Reverse a list with just: #Python #PythonHacks #CodeSimplicity

Belal4Mo's tweet image. List slicing is a game-changer. 
Reverse a list with just:
#Python #PythonHacks #CodeSimplicity

#PythonHacks - One day i was stuck with 2 huge arrays and had to find common and non-common elements. #Numpy came to rescue - setdiff1d() and intersect1d() functions do just that #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - One day i was stuck with 2 huge arrays and had to find common and non-common elements. #Numpy came to rescue - setdiff1d() and intersect1d() functions do just that
#pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

#PythonHacks - in #Pandas, because it is column major, a col -> row access is ~10x faster than row -> col... Wish I knew this earlier! #mindblown #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - in #Pandas, because it is column major, a col -> row access is ~10x faster than row -> col... Wish I knew this earlier! #mindblown

#pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

Loop through the list to apply: 💡 "code" Neatly transform your text with minimal fuss! 🌟 #PythonHacks

YourPythonFun's tweet image. Loop through the list to apply:

💡 "code"

Neatly transform your text with minimal fuss! 🌟 #PythonHacks

#PythonHacks - When iterating #Pandas #DataFrame, using loc() instead of iloc() can boost performance by ~12x! Difference is due to how #python calculates memory address to retrieve an item #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - When iterating #Pandas #DataFrame, using loc() instead of iloc() can boost performance by ~12x! Difference is due to how #python calculates memory address to retrieve an item

#pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

#PythonHacks - Can we improve performance of #Pandas #dataframe in row wise operations? Sure! #Numpy to the rescue! Convert df to np array, and it takes nano seconds instead of milli seconds to iterate!!! #pythoncode #Python #learntocode #machinelearning #coders #100daysofcode

utkarshML's tweet image. #PythonHacks - Can we improve performance of #Pandas #dataframe in row wise operations? Sure! #Numpy to the rescue! Convert df to np array, and it takes nano seconds instead of milli seconds to iterate!!!

#pythoncode #Python #learntocode #machinelearning #coders #100daysofcode

#PythonHacks - do you want to time your code? Use a #Python generator. Any repetitive task can be decoupled and converted to a #generator. It can be re-used over any method, like below - #pythonlearning #pythoncode #learntocode #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - do you want to time your code? Use a #Python generator. Any repetitive task can be decoupled and converted to a #generator. It can be re-used over any method, like below - 

#pythonlearning #pythoncode #learntocode #coders #devcommunity #100daysofcode

#PythonHacks - random number generators are used everywhere. #Numpy made my life simple by offering super efficient functions like rand(), randint(), randn(), choice() etc #100daysofcode #Python #pythoncode #coders #learntocode #devcommunity #pythonlearning

utkarshML's tweet image. #PythonHacks - random number generators are used everywhere. #Numpy made my life simple by offering super efficient functions like rand(), randint(), randn(), choice() etc
#100daysofcode #Python #pythoncode #coders #learntocode #devcommunity #pythonlearning

Found a nifty way to return a export a whole bunch of state from a function as a Python object. 🐲🔥🤷‍♂️☕️ #PythonHacks

heinrichhartman's tweet image. Found a nifty way to return a export a whole bunch of state from a function as a Python object. 🐲🔥🤷‍♂️☕️  #PythonHacks

#PythonHacks - I knew apply() function of #pandas and equivalent map() function for #numpy operations. But there's another great function - reduce() from #functools. Use it to apply operator on all elements #pythoncode #Python #learntocode #machinelearning #coders #100daysofcode

utkarshML's tweet image. #PythonHacks - I knew apply() function of #pandas and equivalent map() function for #numpy operations. But there's another great function - reduce() from #functools. Use it to apply operator on all elements

#pythoncode #Python #learntocode #machinelearning #coders #100daysofcode

Strongly typed Python? You bet! Use typing for type hints and improve readability. Cleaner, safer code. #PythonHacks #CodeSmart

ibm_luq's tweet image. Strongly typed Python? You bet! Use typing for type hints and improve readability.
Cleaner, safer code. #PythonHacks #CodeSmart

Code smarter, not longer! Unlock the power of these 6 Python techniques to write cleaner, shorter, and more efficient code. #PythonHacks #CodeEfficiently #LearnPython #ProgrammingTips #CodingMadeEasy

zydniofficial's tweet image. Code smarter, not longer!

Unlock the power of these 6 Python techniques to write cleaner, shorter, and more efficient code.
 
#PythonHacks #CodeEfficiently #LearnPython #ProgrammingTips #CodingMadeEasy

#PythonHacks - Ever stuck with filtering arrays based on a condition? #Numpy to the rescue. Use where fn to extract data based on conditions #pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - Ever stuck with filtering arrays based on a condition? #Numpy to the rescue. Use where fn to extract data based on conditions

#pythoncode #Python #learntocode #machinelearning #coders #devcommunity #100daysofcode

Yo, fam! Get this - instant summary stats in Sheets! 📊✨ Mean, median, min, max - Python's got you! No more boring formulas, just auto-magic! 🔥 #GoogleSheets #PythonHacks

shauvikkumar's tweet image. Yo, fam! Get this - instant summary stats in Sheets! 📊✨ 
Mean, median, min, max - Python's got you! No more boring formulas, just auto-magic! 🔥

#GoogleSheets #PythonHacks

Yo, fam! 🌍✨ Smash that translate button to turn your sheets into French, Spanish, or Japanese! 💥 Python and Google Translate API got your back! No more app-switching, just vibes! #PythonHacks #GoogleSheetsMagic

shauvikkumar's tweet image. Yo, fam! 🌍✨ Smash that translate button to turn your sheets into French, Spanish, or Japanese! 💥 Python and Google Translate API got your back! No more app-switching, just vibes! #PythonHacks #GoogleSheetsMagic

#PythonHacks - Is #Lambda function better than traditional approach in #Python? Maybe not. But it is far convenient to use, and doesn't degrade performance much! Use it more often! #pythoncode #numpy #learntocode #machinelearning #coders #devcommunity #100daysofcode

utkarshML's tweet image. #PythonHacks - Is #Lambda function better than traditional approach in #Python? Maybe not. But it is far convenient to use, and doesn't degrade performance much! Use it more often!

#pythoncode #numpy #learntocode #machinelearning #coders #devcommunity #100daysofcode

#PythonHacks - ever felt the need to strip all string columns in pandas? there's a simple solution. First select all string (object) columns and then use a lambda function. Do you know a better way? #pandas #pythonlearning #pythoncode #Python #machinelearning #100daysofcode

utkarshML's tweet image. #PythonHacks - ever felt the need to strip all string columns in pandas? there's a simple solution. First select all string (object) columns and then use a lambda function. Do you know a better way?

#pandas #pythonlearning #pythoncode #Python #machinelearning #100daysofcode

➡️ Simplify your code with this #Python trick: 🤖 Flatten a nested list using a list comprehension: flattened_list = [x for sublist in nested_list for x in sublist] #pythonhacks #codingtips

AkshaykKaushik's tweet image. ➡️ Simplify your code with this #Python  trick: 

🤖 Flatten a nested list using a list comprehension:

flattened_list = [x for sublist in nested_list for x in sublist]

#pythonhacks #codingtips

Loading...

Something went wrong.


Something went wrong.


United States Trends