135201
You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
This method only sets the value, so u have to make a verify method and using it when is supposed to be used (for example, before the output)
Читать полностью…
I tried your code and it is working perfectly just as the example from the book.
Читать полностью…
But for some reason, it went away now. Idk why!
Same code, same everything.
I can't due to the group policy
So, I used AI to copy the output:
I picked up "Automate the boring stuff with python" and I was reviewing the basics again.
Chapter1-Chapter8.
# book refrence:
while True:
print('Who are you?')
name = input('>')
if name != 'Joe':
continue
print('Hello, Joe. What is the password? (It is a fish.)')
password = input('>')
if password == 'swordfish':
break
print('Access granted.')
......
#This is my attempt to do it with less lines:
while True:
name = input("Enter your name: ")
if name != "Joe":
continue
password = input("Enter your password Joe: ")
if password == "dumbass":
break
print("Access granted!")
The problem I am facing is that my code reveals the second line after 'continue ' even tho the password is wrong.
This is inline generator without any logic on data. If you want to apply logic, better to create with proper yield statement.
Читать полностью…
Tuples defies with multiple values with comma separated.
Читать полностью…
First expression is for list comprehension and second one is for generator.
To create set, you must define with set keyword. By the way, () is symbol of tuple.
Hello everybody, could you please suggest a comprehensive course for Python ?
Читать полностью…
num1 = int(input("le premier sifre : ..."))
num2 = int(input("LE deuxieme sifre : ..."))
operation = input("rentre votre operation ( +, -, *, / ) : ...")
if operation == "+":
print("sonucunuz : " , num1 + num2)
elif operation == "-":
print("sonucunuz : " , num1 - num2)
elif operation == "*":
print("sonucunuz : " , num1 * num2)
elif operation == "/":
print("sonucunuz : " , num1 / num2)
Lets not spam this group anymore, switch to Discord please
Читать полностью…
Suppose i have a function like this below:
def set_identity_key(
key: str
email: str | None = None,
phone: str | None = None,
) -> None:
data = {
"email": email,
"phone": phone,
}
set_key(
key=key,
value=data,
)
email and phone default to None, it looks like both are optional.email or phone must be provided — either one or both are valid.
See i am when try to use flask, i found the thigns we need to store some data in the user's browser's cookie like
from flask import session
session[pending_register_email] = user_email_id@email.com
Guys, I have a question about my current project.
Users upload documents to our app, and we currently send the PDF directly to the LLM. The PDFs are around 50–120 pages and can contain tables, handwritten content, etc., so Gemini is becoming very expensive.
My task is to reduce the cost. I tried OCR with image processing, but the extracted data is not accurate.
So, is there any better approach to extract the data without using OCR, while keeping good accuracy and reducing the LLM cost?
Please suggest some approaches, guys.
Hello everyone, I'm Joshua.
I'm excited to learn about cyber security and python programming .
The only thing I know right now is print("hello world")
I hope you guys see me grow from a beginner to master.
I'm open to mentorship and accountability partners
/Automation/General/chapter1.py
Enter your name: Jj
Enter your password Joe: Joe
Enter your name: C:\Users\HP\AppData\Local\Programs\Python\Python314\python.exe k:/Coursera/Python/Automat
ion/General/chapter1.py
Enter your password Joe: ww
Enter your name: kk
Enter your password Joe: C:\Users\HP\AppData\Local\Programs\Python\Python314\python.exe k:/Coursera/Python
/Automation/General/chapter1.py
Enter your name: jj
Enter your password Joe: C:\Users\HP\AppData\Local\Programs\Python\Python314\python.exe k:/Coursera/Python
/Automation/General/chapter1.py
Naukri Campus is hosting the India's biggest skill contest to help you stand out to recruiters, win prizes, and more! Don't miss out, enrol now here:
https://www.naukri.com/campus/contests/young-turks-skills-assessment-test?action=enrol&referral=e2000105-rY4PEHZ-pseu&uapp=8010&utm_source=share_pwa&utm_medium=referral
yaa it was very basic i was so glad to recall this, but still i need to know a little more about generator making 💚
Читать полностью…
squares_list = [x * x for x in range(1000000)]
squares_gen = (x * x for x in range(1000000))
Check out @PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.
Читать полностью…
i will give my all code example and just ask there with proper traceback?
will this disussable in ur ledger
so actually the problem is what i will stated with my code example:-
is this the yield session not working here in flask-di, as i see in fastapi they just has yield session, and in the fun parameter variable:sessionDep lile this works so perfectly, so my main point of open a issue to saying this to work like fastapi