Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

main arguments python

import sys

#run on cmd - python <file_name.py> argument1 argument2

print(len(sys.argv)) #2
print(sys.argv[1]) #argument1
Comment

PREVIOUS NEXT
Code Example
Python :: split list in 3 part 
Python :: set the root directory when starting jupyter notebooks 
Python :: dot product python 
Python :: pyspark correlation 
Python :: check if number in range 
Python :: pandas series sort 
Python :: Finding the Variance and Standard Deviation of a list of numbers in Python 
Python :: tqdm parallel 
Python :: print random word py 
Python :: q django 
Python :: download pdf using python 
Python :: uninstall poetry 
Python :: Python - Drop row if two columns are NaN 
Python :: How to replace both the diagonals of dataframe with 0 in pandas 
Python :: How to get the current user email from the account logged in? odoo 
Python :: how to convert input to uppercase in python 
Python :: python open folder in explorer 
Python :: scrapy user agent 
Python :: python wikipedia api search 
Python :: Add a quit button Tkinter 
Python :: write file with python 
Python :: como deixar todas as letras maiusculas no python 
Python :: how to write to a file in python without deleting all content 
Python :: explode dictionary pandas 
Python :: calculate integral python 
Python :: RuntimeError: Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 
Python :: python get angle between two points 
Python :: round python 
Python :: TabError: inconsistent use of tabs and spaces in indentation 
Python :: pandas inner join on two columns 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =