© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
ADITYA RAJ
Front-end web developer
Well Explained. x = "awesome"
def myfunc(): x = "fantastic" print("Aditya is " + x)
myfunc()
print("Aditya is " + x) what it will be print? Sir please Explain
Chris Bongers
Looking to get into development? As a full-stack developer I guide you on this journey and give you bite sized tips every single day 👊
This specific case would give you some error since x is not defined.
However I think your indentation is off, so the top one would print "Aditya is awesome" and the bottom print would give an error as well because x is not defined there.
it will given me the output is
print(Aditya is awesome) print(Aditya is Fantastic)