quarta-feira, junho 24, 2020

Calling functions without keyword arguments

Calling functions without keyword arguments
 
 
def student(firstname, lastname ='Mark', standard ='Fifth'):
     print(firstname, lastname, 'studies in', standard, 'Standard')
  
# 1 positional argument
student('John'
  
# 3 positional arguments                         
student('John', 'Gates', 'Seventh')     
  
# 2 positional arguments  
student('John', 'Gates')                  
student('John', 'Seventh')

https://www.geeksforgeeks.org/default-arguments-in-python/

How to clear screen in python?

How to clear screen in python?


https://www.geeksforgeeks.org/clear-screen-python/

# import only system from os
from os import system, name

# import sleep to show output for some time period
from time import sleep

# define our clear function
def clear():

    # for windows
    if name == 'nt':
        _ = system('cls')

    # for mac and linux(here, os.name is 'posix')
    else:
        _ = system('clear')

# print out some text
print('hello geeks\n'*10)

# sleep for 2 seconds after printing output
sleep(2)

# now call function we defined above
clear()

Tail for Windows 10

DisplayTool 2.1 for Windows 7/8/10

DisplayTool is the small, powerful helper for administrators and developers. Text files can be viewed in real time - changes are displayed immediately. Even remote files can be viewed over the network. If the remote computer is restarted, DisplayTool waits for connectivity and immediately displays the file again.
  • Permanently displays the end of a text file
  • Filter for fast search for lines
  • Many modification options (shortening, expanding, filtering, ...)
  • Robust tool - waits for file at reboot
  • Callable via command line with parameters
  • Free - also for commercial use




http://display-tool.com/