Python Codes Basic to Advance
2.66K subscribers
82 photos
5 videos
8 files
100 links
Python Codes Basic to Advance

All Codes
@C_Codes_pro
@CPP_Codes_pro
@Java_Codes_Pro
@nodejs_codes_pro

Discussion
@bca_mca_btech
Download Telegram
Forwarded from Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs (</> ᴍᴜᴋᴇsʜ </>)
One line printing in python.

We know that the print function prints on each line, and if we use two print functions, they will print on two lines. This example will show how to output on the same line without branching to a new one.

Jᴏɪɴ ᴜs :- @CodesSnippet
Forwarded from PYTHON PROGRAMMING (</> ᴍᴜᴋᴇsʜ </>)
print(7>6.1>6>5>=5.0)
Anonymous Quiz
23%
False
54%
True
23%
Error
Forwarded from Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs (</> ᴍᴜᴋᴇsʜ </>)
⌨️ Remove the Background of an Image Using Python

# pip install rembg pillow

from rembg import remove
from PIL import Image

input_path = "in.png"
output_path = "out.png"

input = Image.open(input_path)
output = remove(input)
output.save(output_path)


📱 Join us for more Python tips: @CodesSnippet

#python #programming #code #python3 #dailypost
👍5
Python Programming is developed in :
Anonymous Quiz
37%
C Programming
26%
Django framework
36%
Py Framework
1
Which of the following is not one of the quotation marks we use when writing code in Python?
Anonymous Quiz
20%
Double Quotes
22%
Single Quotes
43%
Quartet Quotes
15%
Triple Quotes
Forwarded from ˹ᴍʀ sᴜᴋᴋᴜɴ˼ (</> ᴍᴜᴋᴇsʜ </>)
Run Javascript code using python subprocess Library
import subprocess
js_code = """
console.log("Hello, World!");
"""

with open("script.js", "w") as file:
file.write(js_code)

result = subprocess.run(["node", "script.js"], capture_output=True, text=True)

print(result.stdout)


By : @Mr_Sukkun
2👍1🔥1
Find system name , version processor using python.

import platform

system_name = platform.system()

system_version = platform.version()

architecture = platform.architecture()[0]

processor = platform.processor()

print("OS:", system_name)
print("OS Version:", system_version)
print("32 or 64:", architecture)
print("Processor :", processor)

Jᴏɪɴ ᴜs :- @Python_Codes_Pro

Support group :- @python_group_pro
👍1
Forwarded from Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs (</> ᴍᴜᴋᴇsʜ </>)
🔥1
Forwarded from PYTHON PROGRAMMING (</> ᴍᴜᴋᴇsʜ </>)
Interview question

How do any() and all() work?

Answer: any() - takes a sequence and returns true if any element in the sequence is true.

all() - Returns true only if all elements in the sequence are true.

➡️ Python Developer
Forwarded from Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs (</> ᴍᴜᴋᴇsʜ </>)
What is the output of following Python Code?
#python
1👍1
Forwarded from Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs (ᴀɴᴋɪᴛ </>)
s = set()

s.add(20) s.add(20.0) s.add("20") print(len(s))
Anonymous Quiz
17%
1
40%
2
26%
3
17%
None
👍21
Forwarded from Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs (</>)
print(bool('0'))
print(bool(0))
Anonymous Quiz
28%
False , True
36%
True, False
25%
False, False
11%
True, True
4👍1
4
Forwarded from PYTHON PROGRAMMING (</> ᴍᴜᴋᴇsʜ </>)
print(max("hHiI"))
Anonymous Quiz
30%
H
18%
I
14%
i
16%
h
23%
Error
2👍1
Forwarded from Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs (</> ᴍᴜᴋᴇsʜ </>)
print(min("hHiI"))
Anonymous Quiz
31%
H
27%
h
5%
I
10%
i
26%
Error
2
Forwarded from Cᴏᴅᴇs Sɴɪᴘᴘᴇᴛs (</> ᴍᴜᴋᴇsʜ </>)
In Python, lists are mutable.
Anonymous Quiz
79%
True
21%
False
Learn Telegram bot development using Nodejs telegraf library: https://www.youtube.com/playlist?list=PLjEYzWkdEvxvJ8lZacERw_NiUKbB7l_dx

1 more video added
Subscribe to get updates
Solve it, using while loop !

Note :- Don't use len function
Solve it using while loop:
Note Dont use split or indexing method.
2