feat: 初次提交
This commit is contained in:
22
main.py
Normal file
22
main.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# This is a sample Python script.
|
||||
|
||||
# Press Alt+Shift+X to execute it or replace it with your code.
|
||||
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
|
||||
import json
|
||||
|
||||
|
||||
def print_hi(name):
|
||||
str = '[{1001,[{0,-1,"",100}],[{"alice",100}]},{1002,[{1001,0,"alice",25}],[{"bob",25},{"alice",75}]},{1003,[{1002,1,"alice",5},{1002,0,"bob",20}],[{"eve",25},{"alice",70},{"bob",5}]}]'
|
||||
getObject(str)
|
||||
# Use a breakpoint in the code line below to debug your script.
|
||||
print(f'Hi, {name}') # Press Ctrl+Shift+B to toggle the breakpoint.
|
||||
|
||||
def getObject(str):
|
||||
jsonArray = json.dumps(str)
|
||||
return jsonArray
|
||||
|
||||
# Press the green button in the gutter to run the script.
|
||||
if __name__ == '__main__':
|
||||
print_hi('PyCharm')
|
||||
|
||||
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
|
||||
Reference in New Issue
Block a user