Cart / 0.00$

No products in the cart.

SyntaxError with f-...
 
Notifications
Clear all

[Solved] SyntaxError with f-strings - Why is Python complaining about my code?

1 Posts
2 Users
0 Reactions
76 Views
0
Topic starter

I'm trying to use an f-string in my Python script, and I'm getting a "SyntaxError: invalid syntax." What's going on? My code looks fine.

Topic Tags
1 Answer
0

The "SyntaxError: invalid syntax" you're encountering with f-strings might be due to using Python 2, where f-strings are not supported. Ensure you're running Python 3.6 or newer. If you're stuck with Python 2, consider using traditional string formatting methods like format().

Please close the topic if your issue has been resolved. Add comments to continue adding more context or to continue discussion and add answer only if it is the answer of the question.
___
Neuraldemy Support Team | Enroll In Our ML Tutorials

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

*By registering into our website, you agree to the Terms & Conditions and Privacy Policy.

Retrieve your password

Please enter your username or email address to reset your password.

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?