I want to show you, what Python works. How to write functions and if's.
I'm new in Python, i previous worked with C# and other languages which have a compiler.
Python don't needs a compiler. It's an script language. The good is, you can code everywhere and just need to run this file.
But if you code a error, for example Syntax-Error, the program neeeds to go to the line. A Compiler check this on compiling and will show it.
Define a variable
# Define a boolean MyVariable = True # Define a string WelcomeText = "Welcome" # Define a array Names = ['Some', 'Body']
Print/Write to Console
# Print a defined text print("I am at the Console!") # Print a string print(WelcomeText) # Print a multiple Strings/Text print(WelcomeText + ' User')
if MyVariable == True: # Do something
# Define a new function def Welcome: print(WelcomeText) # Run Function Welcome()
for user in names: print(WelcomeText + ' ' + user)
So yeah 🎉
Python is a beatiful language, what mean formatting.
I think it's easy to understand, and i would use Python for small scripts for Linux, Windows and macOS.
For more help, ask me or search in the world-wide-web.
Top comments (2)
First thanks for the interesting post. And a warm welcome to the dev.to community and python community (hopefully 3.X and not 2.7).
Thank you for your contribution. Well yes, I am using the latest version 3.8. 😊