Python Forum
python prints none in function output
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python prints none in function output
#2
The second line in your beginning () function is what's causing the problem. Specifically it's the print statement inside of the input statement.

This is returning None:

this = input (print ('that'))
print ('this')
This is returning the user input:

this = input ('that')
print ('this')
chairmanme0wme0w likes this post
Reply


Messages In This Thread
RE: python prints none in function output - by BashBedlam - Jul-07-2021, 04:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem in output of a function akbarza 9 1,268 Sep-29-2023, 11:13 AM
Last Post: snippsat
  zfill prints extra et the end of a var tester_V 4 924 Mar-24-2023, 06:59 PM
Last Post: tester_V
  How to print the output of a defined function bshoushtarian 4 1,340 Sep-08-2022, 01:44 PM
Last Post: deanhystad
  Doctesting a function which prints a students name along with the maximum mark scored sean1 5 2,313 Feb-01-2022, 12:20 PM
Last Post: Pedroski55
  output correction using print() function afefDXCTN 3 11,159 Sep-18-2021, 06:57 PM
Last Post: Sky_Mx
  variable prints without being declared. ClockPillow 2 1,828 Jul-11-2021, 12:13 AM
Last Post: ClockPillow
  print function output wrong with strings. mposwal 5 3,170 Feb-12-2021, 09:04 AM
Last Post: DPaul
  Output prints Account.id at the end? LastStopDEVS 5 2,832 Dec-19-2020, 05:59 AM
Last Post: buran
  Output with none, print(x) in function Vidar567 3 2,545 Nov-24-2020, 05:40 PM
Last Post: deanhystad
  Try/Exept prints only ones tester_V 11 3,940 Nov-03-2020, 02:38 AM
Last Post: tester_V

Forum Jump:

User Panel Messages

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