On 08/12/2019 08:18, Karsten Hilbert wrote:
Sorry, I should have said just the line, and it didn't return anything.

OK, a bit strange, but then that might be due to Thonny.

Is Thonny an interpreter then.

It sort of is, or at least it runs one. We'd like to take
that out of the equation. I meant to run *just* an interpreter, namely,
the interactive shell built into Python itself.

IOW, run just "python" (or python3) on a command line and a shell
should open in which you can run the line in question.

(remember to define "time" appropriately)

Karsten


In an interactive interpreter:

def print_time():
          current_time = time.strftime("%I:%M")

returns nothing.

I don't know if that is the correct way as I am just using the code from the project I am trying to do
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to