pull-right code code example
Example 1: auto subscrib code
add ?sub_confirmation=1 after your youtube link
E.g. YouTube.com/test?sub_confirmation=1
Example 2: pyserial example code
>>> import serial
>>> ser = serial.Serial('/dev/ttyUSB0') # open serial port
>>> print(ser.name) # check which port was really used
>>> ser.write(b'hello') # write a string
>>> ser.close() # close port