[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-573603-105":53,"doc-detail-573603-en":118},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":111,"head_meta":113,"extra_data":115,"updated_unix":117},105,"en","cs150a-spring-2018-methods-cheat-sheet","CS150A Spring 2018 - Methods Cheat Sheet","","Methods cheat sheet for CS150A Spring 2018, summarizing commonly used Python operations across strings, lists, and dictionaries. It lists method names, required parameters, and the corresponding results, including case conversion (upper, lower), formatting (capitalize, center, ljust, rjust), whitespace handling (strip), searching (find, rfind), splitting and counting (split, count), and replacement (replace). For lists and dictionaries it covers adding, inserting, removing, sorting, reversing, indexing, and dictionary view or lookup behaviors (keys, values, items, get).",{"@graph":63,"@context":110},[64,80,101],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/cs150a-spring-2018-methods-cheat-sheet/573603/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/cs150a-spring-2018-methods-cheat-sheet/573603.png","ImageObject",442,249,{"name":88,"@type":89},"Ben ","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-15","2026-10-14",true,{"@type":98,"interactionType":99,"userInteractionCount":73},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104],{"name":105,"@type":106,"acceptedAnswer":107},"How does the cheat sheet describe dictionary access methods?","Question",{"text":108,"@type":109},"It includes keys, values, items to return views and get (with optional alt) to return the value for a key or a fallback when missing.","Answer","https://schema.org",{"og:url":78,"og:type":112,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":114,"canonical":78},"index,follow",{"doc_id":116,"site_id":56},573603,1792030245,{"code":4,"msg":5,"data":119},{"doc_id":116,"user_id":120,"nickname":88,"user_avatar":121,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":122,"file_id":123,"file_url":124,"file_type":125,"file_size":126,"view_count":73,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":9,"language":127,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":128,"faqs":129,"seo_title":130,"seo_description":61,"update_tm":131,"read_time":4},2336478951081,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","CS150A Spring 2018  \nMethods Cheat Sheet  \n\n| Method Name | Parameters | Result |\n| --- | --- | --- |\n| upper | none | Returns a string in all uppercase |\n| lower | none | Returns a string in all lowercase |\n| capitalize | none | Returns a string with the 􀀂rst character capitalized, the rest lower |\n| strip | none | Returns a string with leading and trailing whitespace removed |\n| split | 's' | Returns a list of substrings split on the string ’s’ |\n| count | item | Returns the number of occurrences of item |\n| replace | old,new | Replaces all occurrences of old substring with new |\n| center | width | Returns a string centered in a 􀀂eld of width spaces |\n| ljust | width | Returns a string left-justi􀀂ed in a 􀀂eld of width spaces |\n| rjust | width | Returns a string right-justi􀀂ed in a 􀀂eld of width spaces |\n| find | item | Returns the leftmost index of the 􀀂rst occurrence of item, or-1 if not found |\n| rfind | item | Returns the rightmost index of the 􀀂rst occurrence of item, or-1 if not found |\n\nTable 1: Python string methods.  \n\n| Method Name | Parameters | Result |\n| --- | --- | --- |\n| append | item | Adds a new item to the end of a list |\n| insert | i,item | Inserts an item at the ith position in a list |\n| pop | none | Removes and returns the last item in a list |\n| pop | i | Removes and returns the ith item in a list |\n| sort | none | Modi􀀂es a list to be sorted |\n| reverse | none | Modi􀀂es a list to be in reverse order |\n| index | item | Returns the index of the 􀀂rst occurrence of item |\n| count | item | Returns the number of occurrences of item |\n| remove | item | Removes the 􀀂rst occurrence of item |\n\nTable 2: Python list methods.  \n\n| Method Name | Parameters | Result |\n| --- | --- | --- |\n| keys | none | Returns a view of the keys in the dictionary |\n| values | none | Returns a view of the values in the dictionary |\n| items | none | Returns a view of the key-value pairs in the dictionary |\n| get | key | Returns the value associated with the key; None otherwise |\n| get | key, alt | Returns the value associated with the key; alt otherwise |\n\nTable 3: Python dictionary methods.","cbCailOr543A6xVC","https://ap.wps.com/l/cbCailOr543A6xVC","pdf",13931,"English","# Methods Cheat Sheet\n## Python String Methods\n## Python List Methods\n## Python Dictionary Methods","[{\"question\":\"How does the cheat sheet describe dictionary access methods?\",\"answer\":\"It includes keys, values, items to return views and get (with optional alt) to return the value for a key or a fallback when missing.\"}]","CS150A Spring 2018 - Methods Cheat Sheet | PDF",1791943282]