Telegram Web Link
#Python #Pandas 🐼
@SuDevelopers @NoPython

♻️فضلا شارك هذا المنشور مع الاصدقاء والمهتمين♻️
#Python PIP #Cheatsheet 👆
@SuDevelopers @NoPython

♻️فضلا شارك هذا المنشور مع الاصدقاء والمهتمين♻️
⌨️ Hide secret message in image using Python
⌨️ إخفاء رسالة سرية في صورة باستخدام #Python
@SuDevelopers @NoPython

♻️فضلا شارك هذا المنشور مع الاصدقاء والمهتمين♻️
⌨️ Grammar Correction using Python
  ⌨️ التصحيح الاملائي للنص باستخدام #Python
@SuDevelopers @NoPython

♻️فضلا شارك هذا المنشور مع الاصدقاء والمهتمين♻️
Python Cheatsheet ♥️

1. Common Data Types
int, float – numbers
str – text
list – ordered, changeable collection
dict – key-value pairs
tuple – like list, but unchangeable
set – unique, unordered items

2. Essential Functions
print() – display output
type() – check data type
len() – count items
range() – generate numbers
input() – take user input

3. String Methods
.upper(), .lower() – change case
.strip() – remove whitespace
.replace() – swap text
.split() – break into list

4. List Methods
append() – add item
pop() – remove item
sort() – sort list
[1:4] – slicing (get part of list)

5. Dictionary Basics
Access: mydict['key']
Safe access: mydict.get('key')
Add/Update: mydict['new'] = value

6. Control Flow
if / elif / else – conditions
for – loop over items
while – loop with condition
break / continue – control loop

7. Functions
def – define a function
return – return a value
lambda – short anonymous function

8. Useful Built-in Modules
math – sqrt, pi, round
random – random numbers, choices
datetime – current date/time
os – system & file handling

9. Popular Libraries for Data Work
NumPy – numerical operations
Pandas – dataframes and analysis
Matplotlib

React with ❤️ for more useful Cheatsheets
ملخص سريع لأهم الدوال في #Python
@SuDevelopers @NoPython

♻️فضلا شارك هذا المنشور مع الاصدقاء والمهتمين♻️

#python
How to convert image to pdf in Python

# Python3 program to convert image to pfd
# using img2pdf library
 
# importing necessary libraries
import img2pdf
from PIL import Image
import os
 
# storing image path
img_path = "Input.png"
 
# storing pdf path
pdf_path = "file_pdf.pdf"
 
# opening image
image = Image.open(img_path)
 
# converting into chunks using img2pdf
pdf_bytes = img2pdf.convert(image.filename)
 
# opening or creating pdf file
file = open(pdf_path, "wb")
 
# writing pdf files with chunks
file.write(pdf_bytes)
 
# closing image file
image.close()
 
# closing pdf file
file.close()
 
# output
print("Successfully made pdf file")

pip3 install pillow && pip3 install img2pdf

تحويل صورة إلى ملف PDF باستخدام #Python
@SuDevelopers @NoPython

♻️فضلا شارك هذا المنشور مع الاصدقاء والمهتمين♻️
2025/06/29 17:22:36
Back to Top
HTML Embed Code: