Relative imports in Python 3

0 votes
In the same directory, I wish to import a function from another file.

One of the following usually works:

The other, however, produces one of the following errors:

Why is that so?
Sep 21, 2022 in Python by Samuel
• 460 points

edited Mar 4 23 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP