Skip to content Skip to sidebar Skip to footer
Showing posts with the label Return

Why Does My Code Not Return Anything

fairly new to programming and trying to learn Python at the moment. I have this code and I don'… Read more Why Does My Code Not Return Anything

Returning Lists Of Instances Makes No Difference? And What About Performance?

I have just realised that for a specific module in my programme, return or not a list of instances … Read more Returning Lists Of Instances Makes No Difference? And What About Performance?

My Function Returns "none"

I am new to Python and I was trying to solve this exercise, but keep getting 'None' output.… Read more My Function Returns "none"

How To Print Statement After Return In Function?

Here is the code as I currently have it: def F(n): t=time.time() if n==0: return (0… Read more How To Print Statement After Return In Function?

How To Get A Single Output From A Function With Multiple Outputs?

I have the following simple function: def divide(x, y): quotient = x/y remainder = x % y … Read more How To Get A Single Output From A Function With Multiple Outputs?

How To Return A String Without Quotes Python 3

I've got to write a single-input module that can convert decimals to Bukiyip (some ancient lang… Read more How To Return A String Without Quotes Python 3

Python3 Exec, Why Returns None?

When the code below this text, and returns the result None why? with open('exx.py', 'rb… Read more Python3 Exec, Why Returns None?

What Is This "and" Statement Actually Doing In The Return?

I am trying to get a better understanding of the following python code and why the author has used … Read more What Is This "and" Statement Actually Doing In The Return?

How Do Scan A Script For Return Values From A Upper Script In Python?

import os import pdb os.system('ToBuildOrNot.py MSS_sims') for output in os.system: … Read more How Do Scan A Script For Return Values From A Upper Script In Python?

Python Inserts Both A Carriage Return And A Line Feed After Variable, Instead Of Just Line Feed

I've created a python script to output every 1-4 character letter combinations from AAAA-ZZZZ e… Read more Python Inserts Both A Carriage Return And A Line Feed After Variable, Instead Of Just Line Feed

Why Isn't This Code Returning These Lists? Does This Have To Do With Using 'return' Rather Than 'print'?

So this is my code, when I had everything set to 'print' things, the code worked, but now w… Read more Why Isn't This Code Returning These Lists? Does This Have To Do With Using 'return' Rather Than 'print'?

Is It Advisable To Use Print Statements In A Python Function Rather Than Return

Lets say I have the function: def function(a) c = a+b print(c) Is it advisable to use the … Read more Is It Advisable To Use Print Statements In A Python Function Rather Than Return

How To Save Mouse Position In Variable Using Opencv And Python?

I'm using Python and OpenCV for some vision application. I need to save mouse position in varia… Read more How To Save Mouse Position In Variable Using Opencv And Python?