input - Read two variables in a single line with Python -


I'm familiar with the input () function, to read a variable from user input Is there an easy easy way to read two variables?

I am looking for equals:

  scanf ("% d% d", & amp; i, & j); // "10 20 \ n"  

Accepts in a way I am able to get it to raw_input () and then split What is a more beautiful way of what was recorded?

It is not for live use. Just to learn ..

No , The normal way is raw_input (). Split ()

In your case you can use the map (int, raw_input (), split ()) if you want them to have string Instead of integer

do not use input () for that code

import os; Os.system ('do something bad')

/ html>

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -