需求:菜单管理功能(增.删.改),多级树形菜单展示 数据库表设计 create table if not exists Menu( id serial primary key , title ) not null , parent_id int , url ), app_id int , icon ), sortby , create_time timestamp, update_time timestamp, foreign key (parent_id) references Menu(id
字符串操作 name = "alex" print(name.capitalize()) #首字母大写 name = "my name is alex" print(name.count("a")) #统计字母"a"的数量 print(name.center(50,"-")) #一共打印50个字符,变量name在中间,其余用"-"补足 print(name.endswith("