Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

What is wrong with the code?

$
0
0
def numbers():
        array=[]
        while True:
            number=int(raw_input('enter a number:'))
            if number!=42:
                array.append(number)
            else:
                break
        for i in array:
            print i

if __name__=='__main__':
    numbers()

And the question link is: http://www.codechef.com/problems/TEST


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>