Python | sys.getswitchinterval () method

Python Methods and Functions

sys.getswitchinterval () is used to get the interpreter thread switching interval (in seconds). This floating point value specifies the ideal length of time slots allocated to concurrently running Python threads.

Syntax: sys.getswitchinterval ()

Parameter: This method accepts no parameter.

Return Value: It returns the interpreter`s thread switch interval.

Example # 1:

# Python program to explain the sys.getswitchinterval () method

# Import sys module

import sys 

# Using the sys.getswitchinterval () method
# find the switchinterval interpreter stream flow

interval = sys. getswitchinterval ()

# Print result

print (interval) 




Get Solution for free from DataCamp guru