Python Forum
len() function, numbers doesn't work with Geany Editor
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
len() function, numbers doesn't work with Geany Editor
#4
Please read, https://python-forum.io/Thread-How-to-Ex...ython-code
In short, you can execute python code in python shell (i.e. python interactive mode, that is when you have >>>) or save the code in .py file (you can use any IDE or text editor) and execute that file from command line. This is how would you normally write and execute code. python shell normally is used only for some ad-hoc experiment or demo.

When you run in python shell, each line is evaluated and result is displayed immediately. That is why you "see" result.
When you write code in .py file, you need to print in order to get visual output
e.g.
names = ["Karen","John",May","Philips")
print(len(names))
names_length = len(names)
print(names_length)
print(15/3)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: len() function, numbers doesn't work with Geany Editor - by buran - May-08-2020, 04:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  print doesnt work in a function ony 2 326 Mar-11-2024, 12:42 PM
Last Post: Pedroski55
  Why doesn't calling a parent constructor work with arbitrary keyword arguments? PurposefulCoder 4 978 Jun-24-2023, 02:14 PM
Last Post: deanhystad
  Why doesn't this code work? What is wrong with path? Melcu54 7 1,871 Jan-29-2023, 06:24 PM
Last Post: Melcu54
  color code doesn't work harryvl 1 919 Dec-29-2022, 08:59 PM
Last Post: deanhystad
  I dont know why my function won't work? MehHz2526 3 1,215 Nov-28-2022, 09:32 PM
Last Post: deanhystad
  client.get_all_tickers() Doesn't work gerald 2 1,744 Jun-16-2022, 07:59 AM
Last Post: gerald
  pip doesn't work after Python upgrade Pavel_47 10 4,283 May-30-2022, 03:31 PM
Last Post: bowlofred
  Music Notation editor; how to build the editor? direction to go? philipbergwerf 1 1,727 Jan-01-2022, 04:56 PM
Last Post: Larz60+
  For Loop Works Fine But Append For Pandas Doesn't Work knight2000 2 2,053 Dec-18-2021, 02:38 AM
Last Post: knight2000
  Class Method to Calculate Age Doesn't Work gdbengo 1 1,729 Oct-30-2021, 11:20 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020