Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@TAM360
TAM360 / baseball.py
Created August 11, 2021 15:26
basball question
from functools import reduce
def baseball_game_func(ops):
res = []
for elm in ops:
if elm.lstrip('-+').isdigit():
res.append(int(elm))
elif elm == "+":
def compareObjs(obj_1, obj_2):
if (type(obj_1) == dict and type(obj_2) == dict):
if len(obj_1) == len(obj_2):
for key in obj_1:
if key in obj_2 and obj_1[key] == obj_2[key]:
return compareObjs(obj_1[key], obj_2[key])
else:
@TAM360
TAM360 / command_list
Last active October 9, 2021 12:00
list of helpful bash commands
Legend
| symbol | used for |
|=============|=====================|
| - | command description |
| # | comments |
| $ | actual command |
| [] | command's output |
| <> | command's arguments |