Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
6 views

Python

The document discusses multiple ways to take input in Python including splitting input on spaces, splitting a string input on a delimiter, and using a for loop to iterate over a list or range of numbers. It also covers defining functions, if/else conditional statements, and converting lists to NumPy arrays.

Uploaded by

Andu
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Python

The document discusses multiple ways to take input in Python including splitting input on spaces, splitting a string input on a delimiter, and using a for loop to iterate over a list or range of numbers. It also covers defining functions, if/else conditional statements, and converting lists to NumPy arrays.

Uploaded by

Andu
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

multiple input

x = list(map(int, input().split()))
x = list(input().split()) ## values in string
a,b = input("Enter 2 variables").split()

Function

def name_function():
return;

loops

for x in list_name:

for x in range(i): range(start, end, increment)

else if

if b > a:
print("b is greater than a")
elif a == b:
print("a and b are equal")
else:

NumPy

import numpy as np

converting list to array

x = np.array(list)

You might also like