Suppose your file name is demo.py and it contains the following code
return "Hello, World!"
Now you can run it from command line using following line
$ python -c 'from demo import my_func; print my_func()'
so I was following a class and we were focusing on birthdays and how the computer could get ur age and I wrote
birth_year = input(‘birth year: ‘)
And I said keyboardInterrupt can someone help I don’t know what to do
Could you please mention particularly which class you were focusing on? Is that any Youtube video or anything else?
Now, regarding your query, you can change:
birth_year = input("birth year: ")
I hope this will work.
Good question, glad you brought this up.
I ...READ MORE
It may possible. When you saved your ML ...READ MORE
Example of implicit line continuation:
a = some_function(
Every occurence of "foreach" I've seen (PHP, ...READ MORE
You can also use the random library's ...READ MORE
colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
You can simply the built-in function in ...READ MORE
Since I am using Python 3.6, I ...READ MORE
The backslash "\" character is used to ...READ MORE
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.