Mysterious “None” value added [closed]Replace match inside tagsPOST data handlerOptional argument for...

How can I make my BBEG immortal short of making them a Lich or Vampire?

"You are your self first supporter", a more proper way to say it

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

Was any UN Security Council vote triple-vetoed?

Which country benefited the most from UN Security Council vetoes?

Why doesn't H₄O²⁺ exist?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

How much of data wrangling is a data scientist's job?

Can a vampire attack twice with their claws using Multiattack?

Approximately how much travel time was saved by the opening of the Suez Canal in 1869?

Intersection point of 2 lines defined by 2 points each

How can bays and straits be determined in a procedurally generated map?

Malformed Address '10.10.21.08/24', must be X.X.X.X/NN or

What would happen to a modern skyscraper if it rains micro blackholes?

Replacing matching entries in one column of a file by another column from a different file

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

DC-DC converter from low voltage at high current, to high voltage at low current

Why is Minecraft giving an OpenGL error?

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

Could an aircraft fly or hover using only jets of compressed air?

Languages that we cannot (dis)prove to be Context-Free

LWC SFDX source push error TypeError: LWC1009: decl.moveTo is not a function

Cross compiling for RPi - error while loading shared libraries

What defenses are there against being summoned by the Gate spell?



Mysterious “None” value added [closed]


Replace match inside tagsPOST data handlerOptional argument for which None is a valid valueAccessing value from either os.environ or argparseFind values in list which sum to a given value within tolerancepython3 utility: convert safely to intPython Guess the Word GamePython Simple Hangman GameText-Turn based dueling gameScraping and printing titles from Craigslist






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







-3












$begingroup$


Why does the output include a none value for the following code?



def per(x):
w = [int(y) for y in str(x)]
for q in w:
print(q)

print(per(222))


Output:
2
2
2
None










share|improve this question











$endgroup$



closed as off-topic by Ludisposed, VisualMelon, Toby Speight, mdfst13, Sᴀᴍ Onᴇᴌᴀ Mar 29 at 15:20


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Ludisposed, Toby Speight, Sᴀᴍ Onᴇᴌᴀ

If this question can be reworded to fit the rules in the help center, please edit the question.












  • 3




    $begingroup$
    You print the output of the function, which has no return. And by default functions returns None.
    $endgroup$
    – Ludisposed
    Mar 29 at 14:30






  • 2




    $begingroup$
    This is off topic, take another look at our help center
    $endgroup$
    – Ludisposed
    Mar 29 at 14:35










  • $begingroup$
    I'm voting to close this question as off-topic because questions soliciting an explanation of how code works are explicitly off-topic
    $endgroup$
    – VisualMelon
    Mar 29 at 14:36










  • $begingroup$
    Stack Overflow already has your answer, I expect.
    $endgroup$
    – Toby Speight
    Mar 29 at 14:43


















-3












$begingroup$


Why does the output include a none value for the following code?



def per(x):
w = [int(y) for y in str(x)]
for q in w:
print(q)

print(per(222))


Output:
2
2
2
None










share|improve this question











$endgroup$



closed as off-topic by Ludisposed, VisualMelon, Toby Speight, mdfst13, Sᴀᴍ Onᴇᴌᴀ Mar 29 at 15:20


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Ludisposed, Toby Speight, Sᴀᴍ Onᴇᴌᴀ

If this question can be reworded to fit the rules in the help center, please edit the question.












  • 3




    $begingroup$
    You print the output of the function, which has no return. And by default functions returns None.
    $endgroup$
    – Ludisposed
    Mar 29 at 14:30






  • 2




    $begingroup$
    This is off topic, take another look at our help center
    $endgroup$
    – Ludisposed
    Mar 29 at 14:35










  • $begingroup$
    I'm voting to close this question as off-topic because questions soliciting an explanation of how code works are explicitly off-topic
    $endgroup$
    – VisualMelon
    Mar 29 at 14:36










  • $begingroup$
    Stack Overflow already has your answer, I expect.
    $endgroup$
    – Toby Speight
    Mar 29 at 14:43














-3












-3








-3





$begingroup$


Why does the output include a none value for the following code?



def per(x):
w = [int(y) for y in str(x)]
for q in w:
print(q)

print(per(222))


Output:
2
2
2
None










share|improve this question











$endgroup$




Why does the output include a none value for the following code?



def per(x):
w = [int(y) for y in str(x)]
for q in w:
print(q)

print(per(222))


Output:
2
2
2
None







python beginner






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 29 at 14:58









smiller

1033




1033










asked Mar 29 at 14:10









user196383user196383

1




1




closed as off-topic by Ludisposed, VisualMelon, Toby Speight, mdfst13, Sᴀᴍ Onᴇᴌᴀ Mar 29 at 15:20


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Ludisposed, Toby Speight, Sᴀᴍ Onᴇᴌᴀ

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by Ludisposed, VisualMelon, Toby Speight, mdfst13, Sᴀᴍ Onᴇᴌᴀ Mar 29 at 15:20


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Ludisposed, Toby Speight, Sᴀᴍ Onᴇᴌᴀ

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 3




    $begingroup$
    You print the output of the function, which has no return. And by default functions returns None.
    $endgroup$
    – Ludisposed
    Mar 29 at 14:30






  • 2




    $begingroup$
    This is off topic, take another look at our help center
    $endgroup$
    – Ludisposed
    Mar 29 at 14:35










  • $begingroup$
    I'm voting to close this question as off-topic because questions soliciting an explanation of how code works are explicitly off-topic
    $endgroup$
    – VisualMelon
    Mar 29 at 14:36










  • $begingroup$
    Stack Overflow already has your answer, I expect.
    $endgroup$
    – Toby Speight
    Mar 29 at 14:43














  • 3




    $begingroup$
    You print the output of the function, which has no return. And by default functions returns None.
    $endgroup$
    – Ludisposed
    Mar 29 at 14:30






  • 2




    $begingroup$
    This is off topic, take another look at our help center
    $endgroup$
    – Ludisposed
    Mar 29 at 14:35










  • $begingroup$
    I'm voting to close this question as off-topic because questions soliciting an explanation of how code works are explicitly off-topic
    $endgroup$
    – VisualMelon
    Mar 29 at 14:36










  • $begingroup$
    Stack Overflow already has your answer, I expect.
    $endgroup$
    – Toby Speight
    Mar 29 at 14:43








3




3




$begingroup$
You print the output of the function, which has no return. And by default functions returns None.
$endgroup$
– Ludisposed
Mar 29 at 14:30




$begingroup$
You print the output of the function, which has no return. And by default functions returns None.
$endgroup$
– Ludisposed
Mar 29 at 14:30




2




2




$begingroup$
This is off topic, take another look at our help center
$endgroup$
– Ludisposed
Mar 29 at 14:35




$begingroup$
This is off topic, take another look at our help center
$endgroup$
– Ludisposed
Mar 29 at 14:35












$begingroup$
I'm voting to close this question as off-topic because questions soliciting an explanation of how code works are explicitly off-topic
$endgroup$
– VisualMelon
Mar 29 at 14:36




$begingroup$
I'm voting to close this question as off-topic because questions soliciting an explanation of how code works are explicitly off-topic
$endgroup$
– VisualMelon
Mar 29 at 14:36












$begingroup$
Stack Overflow already has your answer, I expect.
$endgroup$
– Toby Speight
Mar 29 at 14:43




$begingroup$
Stack Overflow already has your answer, I expect.
$endgroup$
– Toby Speight
Mar 29 at 14:43










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

How do i solve the “ No module named 'mlxtend' ” issue on Jupyter?

Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...