[Beginner] Spliting input

Andrew Bell andrew.bell.ia at gmail.com
Thu Jun 25 08:06:58 EDT 2020


Without knowing the problem you're having, it's hard to answer.
This seems generally correct.

On Thu, Jun 25, 2020 at 7:57 AM Bischoop <Bischoop at vimuster.net> wrote:

> I try to split input numbers, for example: 12 so I cant add them, I
> tried separated split(' ') but it's not working.
> Any ideas how to do this?
>
> *
> numb1,numb2=input("enter 1st and 2nd no ").split()
> Avg=(int(numb1) + int(numb2)) / 2
> print(Avg)
>

-- 
Andrew Bell
andrew.bell.ia at gmail.com


More information about the Python-list mailing list