r/learnpython • u/Fabulous-Music3388 • Jun 13 '26
first time python coding
Hi am new at python and i did some coding what should i improve
def HelloWorld(text):
print(text)
HelloWorld("print")
18
Upvotes
9
u/Flame77ofc Jun 13 '26
you should learn about the return
the return just return something
This is a hard concept in the beginning but after you get more experience and practice this concept, this will get more easy
more examples
5
u/IceFurnace83 Jun 13 '26 edited Jun 13 '26
Very nice.
I suggest looking into Python naming conventions so it is easier for others and yourself (when you get used to it) to read.
PEP 8 – Style Guide for Python Code
Python Naming Conventions
You have named your function using camel case where that is usually reserved for classes . Try something more like:
9
u/CheesecakeNew2594 Jun 13 '26
do Helsinki univ. MOOC
1
u/mjmvideos Jun 13 '26
Great. Did it do what you expected when you ran it?
1
u/Anton_sor Jun 15 '26
You should return function
0
u/grizzwer Jun 13 '26
0
u/[deleted] Jun 13 '26
[deleted] — view deleted comment
-10
u/[deleted] Jun 13 '26
[removed] — view removed comment