Related Ads Link

python int to string

Learn How to Convert Int to String in Python (Step by Step)

Python is an Object Oriented language, here we can try many things and complete tasks really easy. Today we are gonna talk about Converting python int to string. Yes, this is the really easy process. Just follow the steps for doing this really easy, here we stared,

Coverting python int to string for non integer Inputs

If you wanna manage non-iteger inputs in python, here is the solution for you

number = raw_input()
try:
value = int(number)
except ValueError:
value = 0

You can take your latest code to python int to string, How? i will show you,

t=raw_input()
c=[]
for j in range(0,int(t)):
n=raw_input()
a=[]
a,b= (int(i) for i in n.split(' '))
d=pow(a,b)
d2=str(d)
c.append(d2[0])
for j in c:
print j

The output given will look like this:

>>> 2
>>> 8 2
>>> 2 3
6
8

Hope you get the solution. you may read other article like this in related post section, Cheers!

 

 

 

 



A Programmer by Passion and a Passionate Blogger by Heart <3 . CodingLio was my Dream Idea, I wanted To Create a Medium where, Geeks can actually Learn Something.


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: