Bloomberg L.P. Interview Question: How would you go about extrac... | Glassdoor

Interview Question

Financial Applications Engineer Interview(Student Candidate)

How would you go about extracting individual digits from

  , and reversing the order of a 6 digit number in any programming language you are familiar with. Write out code on blank piece of paper.

Interview Answer

1 Answer


In Python,

1. num_list = [int(i) for i in list(str(num))]

2. int(str(num)[::-1])

Coders on Feb 26, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.