Python syntax bits and pieces

1. Determine if the character is empty

if not model_path:

 

2. Display the current directory

import them

cur_path = os.path.dirname(os.path.realpath(__file__))
print(cur_path)

 

3.

 

 

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324399222&siteId=291194637