[{"data":1,"prerenderedAt":1673},["ShallowReactive",2],{"/blog/learn-python-with-pj-part-3":3,"navigation-en-us":919,"banner-en-us":1357,"footer-en-us":1365,"blog-post-authors-en-us-PJ Metz":1612,"blog-related-posts-en-us-learn-python-with-pj-part-3":1628,"blog-share-wrapper-en-us":1653,"next-steps-en-us":1663},{"id":4,"title":5,"authors":6,"body":8,"category":898,"date":899,"description":900,"extension":901,"externalUrl":902,"faq":902,"featured":903,"heroImage":904,"hidePromo":903,"meta":905,"navigation":105,"path":906,"seo":907,"slug":911,"stem":912,"tags":913,"template":917,"updatedDate":902,"__hash__":918},"blogPosts/en-us/blog/learn-python-with-pj-part-3.md","Learn Python with Pj! Part 3 - Functions and strings",[7],"PJ Metz",{"type":9,"value":10,"toc":892},"minimark",[11,29,44,49,52,120,126,499,520,524,527,607,612,622,885,888],[12,13,14],"p",{},[15,16,17,18,23,24,28],"em",{},"This is the third installment in the Learn Python with Pj! series. Make sure to read ",[19,20,22],"a",{"href":21},"/blog/learn-python-with-pj-part-1/","Part 1"," and ",[19,25,27],{"href":26},"/blog/learn-python-with-pj-part-2/","Part 2",".",[12,30,31,32,36,37,36,40,43],{},"In learning Python, I’m happy to have found a language with a straightforward syntax that just seems to make sense. I don’t have to define a type; Python just knows. I don’t have to worry about ",[33,34,35],"code",{},"let"," or ",[33,38,39],{},"const",[33,41,42],{},"var"," for different use cases; I just make the variable. I’m very glad I learned C# and JavaScript first, as those feel important to understanding exactly what is happening when I write code. In turn, I think it’s made Python easier for me, which is usually true when learning another programming language: Your second and third are easier to learn since your brain understands “programming logic” better now than when you made your first “Hello World”. This week we’re going to talk about what I’ve learned in functions and strings.",[45,46,48],"h2",{"id":47},"functions","Functions",[12,50,51],{},"Functions are the backbone of any app you write. It’s an important step in learning any language to learn how to put a series of actions inside a single function that can be called later in the code. Python does this simply compared to other languages I’ve learned.",[53,54,59],"pre",{"className":55,"code":56,"language":57,"meta":58,"style":58},"language-python shiki shiki-themes github-light","def my_first_function(arg1, arg2):\n  print(f”Your input was {arg1} and {arg2}.”)\n\n#prints “Your input was hilarious and unnecessary”\nmy_first_function(“hilarious”, “unnecessary”)\n","python","",[33,60,61,78,100,107,114],{"__ignoreMap":58},[62,63,66,70,74],"span",{"class":64,"line":65},"line",1,[62,67,69],{"class":68},"sD7c4","def",[62,71,73],{"class":72},"s7eDp"," my_first_function",[62,75,77],{"class":76},"sgsFI","(arg1, arg2):\n",[62,79,81,85,88,91,94,97],{"class":64,"line":80},2,[62,82,84],{"class":83},"sYu0t","  print",[62,86,87],{"class":76},"(f”Your ",[62,89,90],{"class":83},"input",[62,92,93],{"class":76}," was {arg1} ",[62,95,96],{"class":68},"and",[62,98,99],{"class":76}," {arg2}.”)\n",[62,101,103],{"class":64,"line":102},3,[62,104,106],{"emptyLinePlaceholder":105},true,"\n",[62,108,110],{"class":64,"line":109},4,[62,111,113],{"class":112},"sAwPA","#prints “Your input was hilarious and unnecessary”\n",[62,115,117],{"class":64,"line":116},5,[62,118,119],{"class":76},"my_first_function(“hilarious”, “unnecessary”)\n",[12,121,122,123,125],{},"Using the keyword ",[33,124,69],{}," lets Python know that you’re about to write a function. Inside the parentheses, you put any parameters that must be included when calling the function. Some people use argument and parameter interchangeably, but technically, when defining a function, it’s a parameter, and when calling a function, it’s an argument. Either way, when defining the function, include some variables that you’ll expect when the function is called later. Finally, put a colon and then move to the next line. All the code for the function to run is indented. Inside the function, you can run loops, logic, or even other functions. Let’s check out a slightly more complex use.",[53,127,129],{"className":55,"code":128,"language":57,"meta":58,"style":58},"def halloween_horror_nights(days, link,):\n    named = input(\"What is your name?\")\n    name = named.capitalize()\n    if isinstance(days, int):\n        if days == 0:\n            print(f\" Hello, {name}. We're ready to see you at HHN. {link}\")\n        elif days \u003C= 30:\n            print(f\"{name}, You have {days} days until the terror is home. {link}\")\n        elif days \u003C= 60:\n            print(f\"{name}, The horror comes home in {days} days. Join us in the dark. {link}\")\n        elif days \u003C 365 and days > 60:\n            print(f\"{name}, Patience is a virtue. You're {days} days away from the top rated Halloween event in the world.{link}\")\n        else:\n            print(f\"{name}, it can't be more than a year away. It's closer than you think... {link}\")\n    else:\n        print(\"Days must be an int\")\n        #This will print “{Name input by user}, The horror comes home in 56 days. Join us in the dark. https://orlando.halloweenhorrornights.com/site\"\nhalloween_horror_nights(56, \"https://orlando.halloweenhorrornights.com/site\")\n",[33,130,131,141,162,172,189,206,244,260,300,314,353,378,417,425,455,463,476,482],{"__ignoreMap":58},[62,132,133,135,138],{"class":64,"line":65},[62,134,69],{"class":68},[62,136,137],{"class":72}," halloween_horror_nights",[62,139,140],{"class":76},"(days, link,):\n",[62,142,143,146,149,152,155,159],{"class":64,"line":80},[62,144,145],{"class":76},"    named ",[62,147,148],{"class":68},"=",[62,150,151],{"class":83}," input",[62,153,154],{"class":76},"(",[62,156,158],{"class":157},"sYBdl","\"What is your name?\"",[62,160,161],{"class":76},")\n",[62,163,164,167,169],{"class":64,"line":102},[62,165,166],{"class":76},"    name ",[62,168,148],{"class":68},[62,170,171],{"class":76}," named.capitalize()\n",[62,173,174,177,180,183,186],{"class":64,"line":109},[62,175,176],{"class":68},"    if",[62,178,179],{"class":83}," isinstance",[62,181,182],{"class":76},"(days, ",[62,184,185],{"class":83},"int",[62,187,188],{"class":76},"):\n",[62,190,191,194,197,200,203],{"class":64,"line":116},[62,192,193],{"class":68},"        if",[62,195,196],{"class":76}," days ",[62,198,199],{"class":68},"==",[62,201,202],{"class":83}," 0",[62,204,205],{"class":76},":\n",[62,207,209,212,214,217,220,223,226,229,232,234,237,239,242],{"class":64,"line":208},6,[62,210,211],{"class":83},"            print",[62,213,154],{"class":76},[62,215,216],{"class":68},"f",[62,218,219],{"class":157},"\" Hello, ",[62,221,222],{"class":83},"{",[62,224,225],{"class":76},"name",[62,227,228],{"class":83},"}",[62,230,231],{"class":157},". We're ready to see you at HHN. ",[62,233,222],{"class":83},[62,235,236],{"class":76},"link",[62,238,228],{"class":83},[62,240,241],{"class":157},"\"",[62,243,161],{"class":76},[62,245,247,250,252,255,258],{"class":64,"line":246},7,[62,248,249],{"class":68},"        elif",[62,251,196],{"class":76},[62,253,254],{"class":68},"\u003C=",[62,256,257],{"class":83}," 30",[62,259,205],{"class":76},[62,261,263,265,267,269,271,273,275,277,280,282,285,287,290,292,294,296,298],{"class":64,"line":262},8,[62,264,211],{"class":83},[62,266,154],{"class":76},[62,268,216],{"class":68},[62,270,241],{"class":157},[62,272,222],{"class":83},[62,274,225],{"class":76},[62,276,228],{"class":83},[62,278,279],{"class":157},", You have ",[62,281,222],{"class":83},[62,283,284],{"class":76},"days",[62,286,228],{"class":83},[62,288,289],{"class":157}," days until the terror is home. ",[62,291,222],{"class":83},[62,293,236],{"class":76},[62,295,228],{"class":83},[62,297,241],{"class":157},[62,299,161],{"class":76},[62,301,303,305,307,309,312],{"class":64,"line":302},9,[62,304,249],{"class":68},[62,306,196],{"class":76},[62,308,254],{"class":68},[62,310,311],{"class":83}," 60",[62,313,205],{"class":76},[62,315,317,319,321,323,325,327,329,331,334,336,338,340,343,345,347,349,351],{"class":64,"line":316},10,[62,318,211],{"class":83},[62,320,154],{"class":76},[62,322,216],{"class":68},[62,324,241],{"class":157},[62,326,222],{"class":83},[62,328,225],{"class":76},[62,330,228],{"class":83},[62,332,333],{"class":157},", The horror comes home in ",[62,335,222],{"class":83},[62,337,284],{"class":76},[62,339,228],{"class":83},[62,341,342],{"class":157}," days. Join us in the dark. ",[62,344,222],{"class":83},[62,346,236],{"class":76},[62,348,228],{"class":83},[62,350,241],{"class":157},[62,352,161],{"class":76},[62,354,356,358,360,363,366,369,371,374,376],{"class":64,"line":355},11,[62,357,249],{"class":68},[62,359,196],{"class":76},[62,361,362],{"class":68},"\u003C",[62,364,365],{"class":83}," 365",[62,367,368],{"class":68}," and",[62,370,196],{"class":76},[62,372,373],{"class":68},">",[62,375,311],{"class":83},[62,377,205],{"class":76},[62,379,381,383,385,387,389,391,393,395,398,400,402,404,407,409,411,413,415],{"class":64,"line":380},12,[62,382,211],{"class":83},[62,384,154],{"class":76},[62,386,216],{"class":68},[62,388,241],{"class":157},[62,390,222],{"class":83},[62,392,225],{"class":76},[62,394,228],{"class":83},[62,396,397],{"class":157},", Patience is a virtue. You're ",[62,399,222],{"class":83},[62,401,284],{"class":76},[62,403,228],{"class":83},[62,405,406],{"class":157}," days away from the top rated Halloween event in the world.",[62,408,222],{"class":83},[62,410,236],{"class":76},[62,412,228],{"class":83},[62,414,241],{"class":157},[62,416,161],{"class":76},[62,418,420,423],{"class":64,"line":419},13,[62,421,422],{"class":68},"        else",[62,424,205],{"class":76},[62,426,428,430,432,434,436,438,440,442,445,447,449,451,453],{"class":64,"line":427},14,[62,429,211],{"class":83},[62,431,154],{"class":76},[62,433,216],{"class":68},[62,435,241],{"class":157},[62,437,222],{"class":83},[62,439,225],{"class":76},[62,441,228],{"class":83},[62,443,444],{"class":157},", it can't be more than a year away. It's closer than you think... ",[62,446,222],{"class":83},[62,448,236],{"class":76},[62,450,228],{"class":83},[62,452,241],{"class":157},[62,454,161],{"class":76},[62,456,458,461],{"class":64,"line":457},15,[62,459,460],{"class":68},"    else",[62,462,205],{"class":76},[62,464,466,469,471,474],{"class":64,"line":465},16,[62,467,468],{"class":83},"        print",[62,470,154],{"class":76},[62,472,473],{"class":157},"\"Days must be an int\"",[62,475,161],{"class":76},[62,477,479],{"class":64,"line":478},17,[62,480,481],{"class":112},"        #This will print “{Name input by user}, The horror comes home in 56 days. Join us in the dark. https://orlando.halloweenhorrornights.com/site\"\n",[62,483,485,488,491,494,497],{"class":64,"line":484},18,[62,486,487],{"class":76},"halloween_horror_nights(",[62,489,490],{"class":83},"56",[62,492,493],{"class":76},", ",[62,495,496],{"class":157},"\"https://orlando.halloweenhorrornights.com/site\"",[62,498,161],{"class":76},[12,500,501,502,505,506,508,509,512,513,515,516,519],{},"For context, Halloween Horror Nights in Orlando is my favorite event of the year. This function takes in a number of days and a link (meant to be days until the event and a link to the HHN web page) and outputs a string that says how many days are left until the event. The string also includes a link to the web page and asks for user input to personalize each string. The function ",[33,503,504],{},"isinstance()"," checks if ",[33,507,284],{}," is an int to make sure the sentence makes sense and returns ",[33,510,511],{},"True"," if the first argument is the type of the second argument.\nI really found functions in Python to be a lot easier than in other languages, though I still miss the curly brackets of C# and JavaScript. Additionally, the simplicity of ",[33,514,69],{}," followed by the function name and any required parameters is really straightforward and makes reading the code easier. And since code is read more than it’s written, that makes Python pretty awesome in my book.\nI also used the f-string format for these print statements, and it’s still one of my favorite ways to concatenate. It feels easier than a lot of the other ways of inserting variables into a string in Python, and a little easier than the way it’s done in JavaScript, at least to me. I use a different method of including variables in a string called ",[33,517,518],{},".format()",".\nMaking your own functions is important, but there are a bunch of built-in functions in Python. There are also methods, which are similar to functions but are associated with the objects in a class they’re assigned to. Let’s talk about some strings and some methods that come with them.",[45,521,523],{"id":522},"strings","Strings",[12,525,526],{},"I thought it was strange that I had a whole section on strings in my Codecademy Python curriculum, but I soon realized that it was giving me a lot of very useful methods to use on strings that seemed very versatile. The most interesting thing to me is that strings are an object and act like a list of characters. I’m not entirely sure how strings are treated in other languages, but this really struck me as a cool idea. You can even call specific characters using the same syntax you would for a list.",[53,528,530],{"className":55,"code":529,"language":57,"meta":58,"style":58},"spooky = “Halloween Horror Nights is my favorite thing about Autumn.”\n\n#the following prints “l” since it’s the 3rd char in the string `spooky`. print(spooky[2]) ```\n\nOr you can use a for loop on a string.\n\n```python\n#This prints each letter on a new line and capitalizes it. The message now reads vertical in the output.\nfor letter in spooky:\n  print(letter.upper())\n",[33,531,532,548,552,557,561,572,576,582,587,600],{"__ignoreMap":58},[62,533,534,537,539,542,545],{"class":64,"line":65},[62,535,536],{"class":76},"spooky ",[62,538,148],{"class":68},[62,540,541],{"class":76}," “Halloween Horror Nights ",[62,543,544],{"class":68},"is",[62,546,547],{"class":76}," my favorite thing about Autumn.”\n",[62,549,550],{"class":64,"line":80},[62,551,106],{"emptyLinePlaceholder":105},[62,553,554],{"class":64,"line":102},[62,555,556],{"class":112},"#the following prints “l” since it’s the 3rd char in the string `spooky`. print(spooky[2]) ```\n",[62,558,559],{"class":64,"line":109},[62,560,106],{"emptyLinePlaceholder":105},[62,562,563,566,569],{"class":64,"line":116},[62,564,565],{"class":76},"Or you can use a ",[62,567,568],{"class":68},"for",[62,570,571],{"class":76}," loop on a string.\n",[62,573,574],{"class":64,"line":208},[62,575,106],{"emptyLinePlaceholder":105},[62,577,578],{"class":64,"line":246},[62,579,581],{"class":580},"sB1qb","```python\n",[62,583,584],{"class":64,"line":262},[62,585,586],{"class":112},"#This prints each letter on a new line and capitalizes it. The message now reads vertical in the output.\n",[62,588,589,591,594,597],{"class":64,"line":302},[62,590,568],{"class":68},[62,592,593],{"class":76}," letter ",[62,595,596],{"class":68},"in",[62,598,599],{"class":76}," spooky:\n",[62,601,602,604],{"class":64,"line":316},[62,603,84],{"class":83},[62,605,606],{"class":76},"(letter.upper())\n",[608,609,611],"h3",{"id":610},"string-methods","String methods",[12,613,614,615,23,618,621],{},"A few built-in methods exist for strings in Python, like ",[33,616,617],{},"capitalize()",[33,619,620],{},"upper()",", two I used in the above examples. In addition to those, there are many more that can do things like remove the whitespace or noise from the beginning and end of a string, tell you the index of the first appearance of something, or join a list of strings into a single string. There are lots of great included methods. Here’s an exercise I took from Codecademy and changed the content to fit this article's theme.",[53,623,625],{"className":55,"code":624,"language":57,"meta":58,"style":58},"#given a string that contains a ton of information separated by semicolons and commas. Each part is a haunted house name, Universal Studios location, and the year the house appeared at the event.\nhhn_houses_location_year = \"Chucky;Japan;2016, Run;Orlando;2001, The Orfanage: Ashes to Ashes;Orlando;2010, The Real: Haunted Village;Japan;2021, The Undertaker: No Mercy;Hollywood;2000, Welcome to Silent Hill;Hollywood;2012, American Werewolf in London;Orlando;2013\"  \n#this splits the string up into a list where each element of the list is the section separated by a comma.\nhhn_houses_list = hhn_houses_location_year.split(\",\")\n\n#empty list for the next step\nhhn_houses_stripped = []\n\n#this strips any whitespace from the element in the list and adds it to the empty list from before\nfor house in hhn_houses_list:\n    hhn_houses_stripped.append(house.strip())\n\n#empty list for next step\nhhn_house_details = []\n\n#the next few lines split the details into their own list. #first, each house, with the details, is split along the semicolons to make a list of lists, with each house being its own element in the larger list\n#next, empty lists are made for each detail\n#finally, using index numbers, each detail is placed in it’s own list so all the houses, locations, and years are separated. for info in hhn_houses_stripped:\n    hhn_house_details.append(info.split(\";\"))\n\nhouse = []\nlocation = []\nyear = []\n\nfor stuff in hhn_house_details:\n    house.append(stuff[0])\n    location.append(stuff[1])\n    year.append(stuff[2])\n\n#loops through and using .format() prints a sentence that tells about each house. for num in range(0, len(house)):\n  print(\"{} was located in {} for the {} event\".format(house[num], location[num], year[num]))\n",[33,626,627,632,645,650,665,669,674,684,688,693,705,710,714,719,728,732,737,742,747,759,764,774,784,794,799,812,824,835,846,851,857],{"__ignoreMap":58},[62,628,629],{"class":64,"line":65},[62,630,631],{"class":112},"#given a string that contains a ton of information separated by semicolons and commas. Each part is a haunted house name, Universal Studios location, and the year the house appeared at the event.\n",[62,633,634,637,639,642],{"class":64,"line":80},[62,635,636],{"class":76},"hhn_houses_location_year ",[62,638,148],{"class":68},[62,640,641],{"class":157}," \"Chucky;Japan;2016, Run;Orlando;2001, The Orfanage: Ashes to Ashes;Orlando;2010, The Real: Haunted Village;Japan;2021, The Undertaker: No Mercy;Hollywood;2000, Welcome to Silent Hill;Hollywood;2012, American Werewolf in London;Orlando;2013\"",[62,643,644],{"class":76},"  \n",[62,646,647],{"class":64,"line":102},[62,648,649],{"class":112},"#this splits the string up into a list where each element of the list is the section separated by a comma.\n",[62,651,652,655,657,660,663],{"class":64,"line":109},[62,653,654],{"class":76},"hhn_houses_list ",[62,656,148],{"class":68},[62,658,659],{"class":76}," hhn_houses_location_year.split(",[62,661,662],{"class":157},"\",\"",[62,664,161],{"class":76},[62,666,667],{"class":64,"line":116},[62,668,106],{"emptyLinePlaceholder":105},[62,670,671],{"class":64,"line":208},[62,672,673],{"class":112},"#empty list for the next step\n",[62,675,676,679,681],{"class":64,"line":246},[62,677,678],{"class":76},"hhn_houses_stripped ",[62,680,148],{"class":68},[62,682,683],{"class":76}," []\n",[62,685,686],{"class":64,"line":262},[62,687,106],{"emptyLinePlaceholder":105},[62,689,690],{"class":64,"line":302},[62,691,692],{"class":112},"#this strips any whitespace from the element in the list and adds it to the empty list from before\n",[62,694,695,697,700,702],{"class":64,"line":316},[62,696,568],{"class":68},[62,698,699],{"class":76}," house ",[62,701,596],{"class":68},[62,703,704],{"class":76}," hhn_houses_list:\n",[62,706,707],{"class":64,"line":355},[62,708,709],{"class":76},"    hhn_houses_stripped.append(house.strip())\n",[62,711,712],{"class":64,"line":380},[62,713,106],{"emptyLinePlaceholder":105},[62,715,716],{"class":64,"line":419},[62,717,718],{"class":112},"#empty list for next step\n",[62,720,721,724,726],{"class":64,"line":427},[62,722,723],{"class":76},"hhn_house_details ",[62,725,148],{"class":68},[62,727,683],{"class":76},[62,729,730],{"class":64,"line":457},[62,731,106],{"emptyLinePlaceholder":105},[62,733,734],{"class":64,"line":465},[62,735,736],{"class":112},"#the next few lines split the details into their own list. #first, each house, with the details, is split along the semicolons to make a list of lists, with each house being its own element in the larger list\n",[62,738,739],{"class":64,"line":478},[62,740,741],{"class":112},"#next, empty lists are made for each detail\n",[62,743,744],{"class":64,"line":484},[62,745,746],{"class":112},"#finally, using index numbers, each detail is placed in it’s own list so all the houses, locations, and years are separated. for info in hhn_houses_stripped:\n",[62,748,750,753,756],{"class":64,"line":749},19,[62,751,752],{"class":76},"    hhn_house_details.append(info.split(",[62,754,755],{"class":157},"\";\"",[62,757,758],{"class":76},"))\n",[62,760,762],{"class":64,"line":761},20,[62,763,106],{"emptyLinePlaceholder":105},[62,765,767,770,772],{"class":64,"line":766},21,[62,768,769],{"class":76},"house ",[62,771,148],{"class":68},[62,773,683],{"class":76},[62,775,777,780,782],{"class":64,"line":776},22,[62,778,779],{"class":76},"location ",[62,781,148],{"class":68},[62,783,683],{"class":76},[62,785,787,790,792],{"class":64,"line":786},23,[62,788,789],{"class":76},"year ",[62,791,148],{"class":68},[62,793,683],{"class":76},[62,795,797],{"class":64,"line":796},24,[62,798,106],{"emptyLinePlaceholder":105},[62,800,802,804,807,809],{"class":64,"line":801},25,[62,803,568],{"class":68},[62,805,806],{"class":76}," stuff ",[62,808,596],{"class":68},[62,810,811],{"class":76}," hhn_house_details:\n",[62,813,815,818,821],{"class":64,"line":814},26,[62,816,817],{"class":76},"    house.append(stuff[",[62,819,820],{"class":83},"0",[62,822,823],{"class":76},"])\n",[62,825,827,830,833],{"class":64,"line":826},27,[62,828,829],{"class":76},"    location.append(stuff[",[62,831,832],{"class":83},"1",[62,834,823],{"class":76},[62,836,838,841,844],{"class":64,"line":837},28,[62,839,840],{"class":76},"    year.append(stuff[",[62,842,843],{"class":83},"2",[62,845,823],{"class":76},[62,847,849],{"class":64,"line":848},29,[62,850,106],{"emptyLinePlaceholder":105},[62,852,854],{"class":64,"line":853},30,[62,855,856],{"class":112},"#loops through and using .format() prints a sentence that tells about each house. for num in range(0, len(house)):\n",[62,858,860,862,864,866,869,872,874,877,879,882],{"class":64,"line":859},31,[62,861,84],{"class":83},[62,863,154],{"class":76},[62,865,241],{"class":157},[62,867,868],{"class":83},"{}",[62,870,871],{"class":157}," was located in ",[62,873,868],{"class":83},[62,875,876],{"class":157}," for the ",[62,878,868],{"class":83},[62,880,881],{"class":157}," event\"",[62,883,884],{"class":76},".format(house[num], location[num], year[num]))\n",[12,886,887],{},"As you can see, I am obsessed with Halloween horror nights… er, wait, not the point of the article. As you can see, Python’s built-in methods for strings can be pretty useful, especially if you end up with a bunch of data sitting around in unformatted strings. Next time, we’re going to talk about Dictionaries and how they are used in Python!",[889,890,891],"style",{},"html pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html pre.shiki code .sB1qb, html code.shiki .sB1qb{--shiki-default:#B31D28;--shiki-default-font-style:italic}",{"title":58,"searchDepth":80,"depth":80,"links":893},[894,895],{"id":47,"depth":80,"text":48},{"id":522,"depth":80,"text":523,"children":896},[897],{"id":610,"depth":102,"text":611},"engineering","2022-04-04","Pj shares his experiences learning how to program functions and strings.","md",null,false,"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749664962/Blog/Hero%20Images/python.jpg",{},"/en-us/blog/learn-python-with-pj-part-3",{"title":5,"description":900,"ogTitle":5,"ogDescription":900,"noIndex":903,"ogImage":904,"ogUrl":908,"ogSiteName":909,"ogType":910,"canonicalUrls":908},"https://about.gitlab.com/blog/learn-python-with-pj-part-3","https://about.gitlab.com","article","learn-python-with-pj-part-3","en-us/blog/learn-python-with-pj-part-3",[914,915,916],"careers","growth","tutorial","BlogPost","y-hc39GQN1xya2J5XcYcgGfFT6YyH39BKUbqgZ9SHk8",{"logo":920,"freeTrial":925,"sales":930,"login":935,"items":940,"search":1276,"minimal":1308,"duo":1327,"switchNav":1336,"pricingDeployment":1347},{"config":921},{"href":922,"dataGaName":923,"dataGaLocation":924},"/","gitlab logo","header",{"text":926,"config":927},"Get free trial",{"href":928,"dataGaName":929,"dataGaLocation":924},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com&glm_content=default-saas-trial/","free trial",{"text":931,"config":932},"Request a demo",{"href":933,"dataGaName":934,"dataGaLocation":924},"/request-a-demo/","sales",{"text":936,"config":937},"Sign in",{"href":938,"dataGaName":939,"dataGaLocation":924},"https://gitlab.com/users/sign_in/","sign in",[941,1027,1115,1120,1200,1254],{"text":942,"left":105,"config":943,"menu":945},"Platform",{"dataNavLevelOne":944},"platform",{"type":946,"link":947,"columns":951,"feature":1016},"lists",{"text":948,"config":949},"Explore the Platform",{"href":950,"dataGaName":944,"dataGaLocation":924},"/platform/",[952,975,998],{"title":953,"items":954},"DevOps",[955,960,965,970],{"text":956,"config":957},"CI/CD",{"href":958,"dataGaLocation":924,"dataGaName":959},"/solutions/continuous-integration/","ci/cd",{"text":961,"config":962},"Source Code Management",{"href":963,"dataGaLocation":924,"dataGaName":964},"/solutions/source-code-management/","source code management",{"text":966,"config":967},"Agile Delivery",{"href":968,"dataGaLocation":924,"dataGaName":969},"/solutions/agile-delivery/","agile delivery",{"text":971,"config":972},"Artifact Management",{"href":973,"dataGaLocation":924,"dataGaName":974},"/artifact-central/","artifact management",{"title":976,"items":977},"Security & Governance",[978,983,988,993],{"text":979,"config":980},"Application Security Testing",{"href":981,"dataGaLocation":924,"dataGaName":982},"/solutions/application-security-testing/","application security testing",{"text":984,"config":985},"Governance & Compliance",{"href":986,"dataGaLocation":924,"dataGaName":987},"/solutions/software-compliance/","governance and compliance",{"text":989,"config":990},"Secrets Management",{"href":991,"dataGaLocation":924,"dataGaName":992},"/gitlab-secrets-manager/","secrets management",{"text":994,"config":995},"Supply Chain Security",{"href":996,"dataGaLocation":924,"dataGaName":997},"/solutions/supply-chain/","supply chain security",{"title":999,"items":1000},"Agentic AI & Context",[1001,1006,1011],{"text":1002,"config":1003},"Duo Agent Platform",{"href":1004,"dataGaLocation":924,"dataGaName":1005},"/gitlab-duo-agent-platform/","duo agent platform",{"text":1007,"config":1008},"Orbit Context Graph",{"href":1009,"dataGaLocation":924,"dataGaName":1010},"/gitlab-orbit/","orbit",{"text":1012,"config":1013},"Visibility & Measurement",{"href":1014,"dataGaLocation":924,"dataGaName":1015},"/solutions/visibility-measurement/","visibility and measurement",{"config":1017,"title":1020,"text":1021,"link":1022},{"background":1018,"textColor":1019},"url('https://res.cloudinary.com/about-gitlab-com/image/upload/v1790185102/o7dn32anqcb6z8dgd3as.jpg')","#000","GitLab Orbit is generally available","Higher agent accuracy, lower token cost",{"text":1023,"config":1024},"Read the announcement",{"href":1025,"dataGaName":1026,"dataGaLocation":924},"/blog/gitlab-orbit-ga/","orbit ga announcement",{"text":1028,"left":105,"config":1029,"menu":1031},"Solutions",{"dataNavLevelOne":1030},"solutions",{"type":946,"link":1032,"columns":1036,"feature":1106},{"text":1033,"config":1034},"View all Solutions",{"href":1035,"dataGaName":1030,"dataGaLocation":924},"/solutions/",[1037,1055,1073],{"title":1038,"items":1039},"Outcomes",[1040,1045,1050],{"text":1041,"config":1042},"DevOps Modernization",{"href":1043,"dataGaLocation":924,"dataGaName":1044},"/assessments/devops-modernization-assessment/","devops modernization",{"text":1046,"config":1047},"Security Modernization",{"href":1048,"dataGaLocation":924,"dataGaName":1049},"/assessments/security-modernization-assessment/","security modernization",{"text":1051,"config":1052},"AI Modernization",{"href":1053,"dataGaLocation":924,"dataGaName":1054},"/assessments/ai-modernization-assessment/","ai modernization",{"title":1056,"items":1057},"By size",[1058,1063,1068],{"text":1059,"config":1060},"Enterprise",{"href":1061,"dataGaLocation":924,"dataGaName":1062},"/enterprise/","enterprise",{"text":1064,"config":1065},"Small Business",{"href":1066,"dataGaLocation":924,"dataGaName":1067},"/small-business/","small business",{"text":1069,"config":1070},"Startups",{"href":1071,"dataGaLocation":924,"dataGaName":1072},"/solutions/startups/","startups",{"title":1074,"items":1075},"Industries",[1076,1081,1086,1091,1096,1101],{"text":1077,"config":1078},"Financial Services",{"href":1079,"dataGaLocation":924,"dataGaName":1080},"/solutions/finance/","financial services",{"text":1082,"config":1083},"Public Sector",{"href":1084,"dataGaLocation":924,"dataGaName":1085},"/solutions/public-sector/","public sector",{"text":1087,"config":1088},"Telecommunications",{"href":1089,"dataGaLocation":924,"dataGaName":1090},"/solutions/telecommunications/","telecommunications",{"text":1092,"config":1093},"Automotive",{"href":1094,"dataGaLocation":924,"dataGaName":1095},"/solutions/automotive/","automotive",{"text":1097,"config":1098},"Education",{"href":1099,"dataGaLocation":924,"dataGaName":1100},"/solutions/education/","education",{"text":1102,"config":1103},"Aerospace",{"href":1104,"dataGaLocation":924,"dataGaName":1105},"/solutions/aerospace/","aerospace",{"config":1107,"title":1108,"text":1109,"link":1110},{"background":1018,"textColor":1019},"GitLab Security Standard","Learn how to harden your software factory and let AI agents earn autonomy, without trading away security.",{"text":1111,"config":1112},"Explore the standard",{"href":1113,"dataGaName":1114,"dataGaLocation":924},"/gitlab-security-standard/","gitlab security standard",{"text":1116,"config":1117},"Pricing",{"href":1118,"dataGaName":1119,"dataGaLocation":924,"dataNavLevelOne":1119},"/pricing/","pricing",{"text":1121,"config":1122,"menu":1124},"Resources",{"dataNavLevelOne":1123},"resources",{"type":946,"link":1125,"columns":1129,"feature":1191},{"text":1126,"config":1127},"View all resources",{"href":1128,"dataGaName":1123,"dataGaLocation":924},"/resources/",[1130,1163],{"title":1131,"items":1132},"Discover",[1133,1138,1143,1148,1153,1158],{"text":1134,"config":1135},"Docs",{"href":1136,"dataGaName":1137,"dataGaLocation":924},"https://docs.gitlab.com/","docs",{"text":1139,"config":1140},"University",{"href":1141,"dataGaName":1142,"dataGaLocation":924},"https://university.gitlab.com/","university",{"text":1144,"config":1145},"Demo Series",{"href":1146,"dataGaName":1147,"dataGaLocation":924},"/gitlab-technical-demo-series/","demo series",{"text":1149,"config":1150},"Demo Hub",{"href":1151,"dataGaName":1152,"dataGaLocation":924},"/demo-hub/","demo hub",{"text":1154,"config":1155},"Services",{"href":1156,"dataGaName":1157,"dataGaLocation":924},"/services/","services",{"text":1159,"config":1160},"Well Architected",{"href":1161,"dataGaName":1162,"dataGaLocation":924},"/resources/well-architected/","well architected",{"title":1164,"items":1165},"Connect",[1166,1171,1176,1181,1186],{"text":1167,"config":1168},"Blog",{"href":1169,"dataGaName":1170,"dataGaLocation":924},"/blog/","blog",{"text":1172,"config":1173},"Community",{"href":1174,"dataGaName":1175,"dataGaLocation":924},"/community/","community",{"text":1177,"config":1178},"Customers",{"href":1179,"dataGaName":1180,"dataGaLocation":924},"/customers/","customers",{"text":1182,"config":1183},"Partners",{"href":1184,"dataGaName":1185,"dataGaLocation":924},"/partners/","partners",{"text":1187,"config":1188},"Events",{"href":1189,"dataGaName":1190,"dataGaLocation":924},"/events/","events",{"config":1192,"title":1193,"text":1194,"link":1195},{"background":1018,"textColor":1019},"What’s new in GitLab","Stay updated with our latest features and improvements.",{"text":1196,"config":1197},"Read the latest",{"href":1198,"dataGaName":1199,"dataGaLocation":924},"/whats-new/","whats new",{"text":1201,"config":1202,"menu":1204},"Company",{"dataNavLevelOne":1203},"company",{"type":946,"columns":1205},[1206],{"items":1207},[1208,1213,1219,1224,1229,1234,1239,1244,1249],{"text":1209,"config":1210},"About",{"href":1211,"dataGaName":1212,"dataGaLocation":924},"/company/","about",{"text":1214,"config":1215,"footerGa":1218},"Jobs",{"href":1216,"dataGaName":1217,"dataGaLocation":924},"/jobs/","jobs",{"dataGaName":1217},{"text":1220,"config":1221},"Press",{"href":1222,"dataGaName":1223,"dataGaLocation":924},"/press/","press",{"text":1225,"config":1226},"Handbook",{"href":1227,"dataGaName":1228,"dataGaLocation":924},"https://handbook.gitlab.com/","handbook",{"text":1230,"config":1231},"Leadership",{"href":1232,"dataGaName":1233,"dataGaLocation":924},"/company/team/e-group/","leadership",{"text":1235,"config":1236},"Investor relations",{"href":1237,"dataGaName":1238,"dataGaLocation":924},"https://ir.gitlab.com/overview/default.aspx","investor relations",{"text":1240,"config":1241},"Trust Center",{"href":1242,"dataGaName":1243,"dataGaLocation":924},"/security/","trust center",{"text":1245,"config":1246},"AI Transparency Center",{"href":1247,"dataGaName":1248,"dataGaLocation":924},"/ai-transparency-center/","ai transparency center",{"text":1250,"config":1251},"Newsletter",{"href":1252,"dataGaName":1253,"dataGaLocation":924},"/company/contact/#contact-forms","newsletter",{"text":1255,"config":1256,"menu":1257},"Contact us",{"dataNavLevelOne":1203},{"type":946,"columns":1258},[1259],{"items":1260},[1261,1266,1271],{"text":1262,"config":1263},"Talk to sales",{"href":1264,"dataGaName":1265,"dataGaLocation":924},"/sales/","talk to sales",{"text":1267,"config":1268},"Support portal",{"href":1269,"dataGaName":1270,"dataGaLocation":924},"https://support.gitlab.com/hc/en-us","support portal",{"text":1272,"config":1273},"Customer portal",{"href":1274,"dataGaName":1275,"dataGaLocation":924},"https://customers.gitlab.com/customers/sign_in/","customer portal",{"close":1277,"login":1278,"suggestions":1285},"Close",{"text":1279,"link":1280},"To search repositories and projects, login to",{"text":1281,"config":1282},"gitlab.com",{"href":938,"dataGaName":1283,"dataGaLocation":1284},"search login","search",{"text":1286,"default":1287},"Suggestions",[1288,1291,1294,1296,1300,1304],{"text":1289,"config":1290},"GitLab Duo Agent Platform",{"href":1004,"dataGaName":1289,"dataGaLocation":1284},{"text":1292,"config":1293},"Code Suggestions (AI)",{"href":1004,"dataGaName":1292,"dataGaLocation":1284},{"text":956,"config":1295},{"href":958,"dataGaName":956,"dataGaLocation":1284},{"text":1297,"config":1298},"GitLab on AWS",{"href":1299,"dataGaName":1297,"dataGaLocation":1284},"/partners/technology-partners/aws/",{"text":1301,"config":1302},"GitLab on Google Cloud",{"href":1303,"dataGaName":1301,"dataGaLocation":1284},"/partners/technology-partners/google-cloud-platform/",{"text":1305,"config":1306},"Why GitLab?",{"href":1307,"dataGaName":1305,"dataGaLocation":1284},"/why-gitlab/",{"freeTrial":1309,"mobileIcon":1314,"desktopIcon":1319,"secondaryButton":1322},{"text":1310,"config":1311},"Start free trial",{"href":1312,"dataGaName":929,"dataGaLocation":1313},"https://gitlab.com/-/trials/new/","nav",{"altText":1315,"config":1316},"Gitlab Icon",{"src":1317,"dataGaName":1318,"dataGaLocation":1313},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203874/jypbw1jx72aexsoohd7x.svg","gitlab icon",{"altText":1315,"config":1320},{"src":1321,"dataGaName":1318,"dataGaLocation":1313},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203875/gs4c8p8opsgvflgkswz9.svg",{"text":1323,"config":1324},"Get Started",{"href":1325,"dataGaName":1326,"dataGaLocation":1313},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/get-started/","get started",{"freeTrial":1328,"mobileIcon":1332,"desktopIcon":1334},{"text":1329,"config":1330},"Learn more about GitLab Duo",{"href":1004,"dataGaName":1331,"dataGaLocation":1313},"gitlab duo",{"altText":1315,"config":1333},{"src":1317,"dataGaName":1318,"dataGaLocation":1313},{"altText":1315,"config":1335},{"src":1321,"dataGaName":1318,"dataGaLocation":1313},{"button":1337,"mobileIcon":1342,"desktopIcon":1344},{"text":1338,"config":1339},"/switch",{"href":1340,"dataGaName":1341,"dataGaLocation":1313},"#contact","switch",{"altText":1315,"config":1343},{"src":1317,"dataGaName":1318,"dataGaLocation":1313},{"altText":1315,"config":1345},{"src":1346,"dataGaName":1318,"dataGaLocation":1313},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1773335277/ohhpiuoxoldryzrnhfrh.png",{"freeTrial":1348,"mobileIcon":1353,"desktopIcon":1355},{"text":1349,"config":1350},"Back to pricing",{"href":1118,"dataGaName":1351,"dataGaLocation":1313,"icon":1352},"back to pricing","GoBack",{"altText":1315,"config":1354},{"src":1317,"dataGaName":1318,"dataGaLocation":1313},{"altText":1315,"config":1356},{"src":1321,"dataGaName":1318,"dataGaLocation":1313},{"title":1358,"button":1359,"config":1363},"GitLab Orbit is generally available. Increase agent accuracy and lower token cost",{"text":1023,"config":1360},{"href":1025,"dataGaName":1361,"dataGaLocation":1362},"orbit-ga-banner","global-banner",{"layout":1364,"disabled":903},"release",{"data":1366},{"text":1367,"config":1368,"items":1373,"minimal":1601},"Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license",{"twitter":1369,"facebook":1370,"youtube":1371,"linkedin":1372},"https://twitter.com/gitlab","https://www.facebook.com/gitlab","https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg","https://www.linkedin.com/company/gitlab-com",[1374,1422,1481,1528,1569],{"title":1116,"links":1375,"subMenu":1391},[1376,1381,1386],{"text":1377,"config":1378},"View plans",{"href":1118,"dataGaName":1379,"dataGaLocation":1380},"view plans","footer",{"text":1382,"config":1383},"Why Premium?",{"href":1384,"dataGaName":1385,"dataGaLocation":1380},"/pricing/premium/","why premium",{"text":1387,"config":1388},"Why Ultimate?",{"href":1389,"dataGaName":1390,"dataGaLocation":1380},"/pricing/ultimate/","why ultimate",[1392],{"title":1393,"links":1394},"Contact Us",[1395,1398,1400,1402,1407,1412,1417],{"text":1396,"config":1397},"Contact sales",{"href":1264,"dataGaName":934,"dataGaLocation":1380},{"text":1267,"config":1399},{"href":1269,"dataGaName":1270,"dataGaLocation":1380},{"text":1272,"config":1401},{"href":1274,"dataGaName":1275,"dataGaLocation":1380},{"text":1403,"config":1404},"Status",{"href":1405,"dataGaName":1406,"dataGaLocation":1380},"https://status.gitlab.com/","status",{"text":1408,"config":1409},"Terms of use",{"href":1410,"dataGaName":1411,"dataGaLocation":1380},"/terms/","terms of use",{"text":1413,"config":1414},"Privacy statement",{"href":1415,"dataGaName":1416,"dataGaLocation":1380},"/privacy/","privacy statement",{"text":1418,"config":1419},"Cookie preferences",{"dataGaName":1420,"dataGaLocation":1380,"id":1421,"isOneTrustButton":105},"cookie preferences","ot-sdk-btn",{"title":942,"links":1423,"subMenu":1439},[1424,1427,1429,1431,1433,1435],{"text":1425,"config":1426},"Explore the platform",{"href":950,"dataGaName":944,"dataGaLocation":1380},{"text":1002,"config":1428},{"href":1004,"dataGaName":1005,"dataGaLocation":1380},{"text":956,"config":1430},{"href":958,"dataGaName":959,"dataGaLocation":1380},{"text":1007,"config":1432},{"href":1009,"dataGaName":1010,"dataGaLocation":1380},{"text":989,"config":1434},{"href":991,"dataGaName":992,"dataGaLocation":1380},{"text":1436,"config":1437},"Why GitLab",{"href":1307,"dataGaName":1438,"dataGaLocation":1380},"why gitlab",[1440],{"title":1441,"links":1442},"Topics",[1443,1447,1452,1456,1461,1466,1471,1476],{"text":956,"config":1444},{"href":1445,"dataGaName":1446,"dataGaLocation":1380},"/topics/ci-cd/","cicd",{"text":1448,"config":1449},"GitOps",{"href":1450,"dataGaName":1451,"dataGaLocation":1380},"/topics/gitops/","gitops",{"text":953,"config":1453},{"href":1454,"dataGaName":1455,"dataGaLocation":1380},"/topics/devops/","devops",{"text":1457,"config":1458},"Version Control",{"href":1459,"dataGaName":1460,"dataGaLocation":1380},"/topics/version-control/","version control",{"text":1462,"config":1463},"DevSecOps",{"href":1464,"dataGaName":1465,"dataGaLocation":1380},"/topics/devsecops/","devsecops",{"text":1467,"config":1468},"Cloud Native",{"href":1469,"dataGaName":1470,"dataGaLocation":1380},"/topics/cloud-native/","cloud native",{"text":1472,"config":1473},"AI for Coding",{"href":1474,"dataGaName":1475,"dataGaLocation":1380},"/topics/devops/ai-for-coding/","ai for coding",{"text":1477,"config":1478},"Agentic AI",{"href":1479,"dataGaName":1480,"dataGaLocation":1380},"/topics/agentic-ai/","agentic ai",{"title":1028,"links":1482},[1483,1486,1489,1492,1495,1498,1500,1502,1504,1506,1508,1511,1513,1516,1520,1524],{"text":1484,"config":1485},"DevOps modernization",{"href":1043,"dataGaName":1044,"dataGaLocation":1380},{"text":1487,"config":1488},"Security modernization",{"href":1048,"dataGaName":1049,"dataGaLocation":1380},{"text":1490,"config":1491},"AI modernization",{"href":1053,"dataGaName":1054,"dataGaLocation":1380},{"text":1493,"config":1494},"Financial services",{"href":1079,"dataGaName":1080,"dataGaLocation":1380},{"text":1496,"config":1497},"Public sector",{"href":1084,"dataGaName":1085,"dataGaLocation":1380},{"text":1087,"config":1499},{"href":1089,"dataGaName":1090,"dataGaLocation":1380},{"text":1092,"config":1501},{"href":1094,"dataGaName":1095,"dataGaLocation":1380},{"text":1097,"config":1503},{"href":1099,"dataGaName":1100,"dataGaLocation":1380},{"text":1102,"config":1505},{"href":1104,"dataGaName":1105,"dataGaLocation":1380},{"text":1059,"config":1507},{"href":1061,"dataGaName":1062,"dataGaLocation":1380},{"text":1509,"config":1510},"Small business",{"href":1066,"dataGaName":1067,"dataGaLocation":1380},{"text":1069,"config":1512},{"href":1071,"dataGaName":1072,"dataGaLocation":1380},{"text":1448,"config":1514},{"href":1515,"dataGaName":1451,"dataGaLocation":1380},"/solutions/gitops/",{"text":1517,"config":1518},"Software composition analysis",{"href":996,"dataGaName":1519,"dataGaLocation":1380},"software composition analysis",{"text":1521,"config":1522},"Value stream management",{"href":1014,"dataGaName":1523,"dataGaLocation":1380},"value stream management",{"text":1525,"config":1526},"All solutions",{"href":1035,"dataGaName":1527,"dataGaLocation":1380},"all solutions",{"title":1121,"links":1529},[1530,1535,1540,1542,1544,1546,1548,1550,1552,1554,1556,1558,1560,1562,1565],{"text":1531,"config":1532},"Install",{"href":1533,"dataGaName":1534,"dataGaLocation":1380},"/install/","install",{"text":1536,"config":1537},"Quick start guides",{"href":1538,"dataGaName":1539,"dataGaLocation":1380},"/get-started/","quick setup checklists",{"text":1134,"config":1541},{"href":1136,"dataGaName":1137,"dataGaLocation":1380},{"text":1139,"config":1543},{"href":1141,"dataGaName":1142,"dataGaLocation":1380},{"text":1144,"config":1545},{"href":1146,"dataGaName":1147,"dataGaLocation":1380},{"text":1149,"config":1547},{"href":1151,"dataGaName":1152,"dataGaLocation":1380},{"text":1154,"config":1549},{"href":1156,"dataGaName":1157,"dataGaLocation":1380},{"text":1167,"config":1551},{"href":1169,"dataGaName":1170,"dataGaLocation":1380},{"text":1172,"config":1553},{"href":1174,"dataGaName":1175,"dataGaLocation":1380},{"text":1177,"config":1555},{"href":1179,"dataGaName":1180,"dataGaLocation":1380},{"text":1182,"config":1557},{"href":1184,"dataGaName":1185,"dataGaLocation":1380},{"text":1187,"config":1559},{"href":1189,"dataGaName":1190,"dataGaLocation":1380},{"text":1250,"config":1561},{"href":1252,"dataGaName":1253,"dataGaLocation":1380},{"text":1563,"config":1564},"What's new",{"href":1198,"dataGaName":1199,"dataGaLocation":1380},{"text":1566,"config":1567},"All resources",{"href":1128,"dataGaName":1568,"dataGaLocation":1380},"all resources",{"title":1201,"links":1570},[1571,1573,1575,1577,1579,1581,1583,1585,1587,1591,1596],{"text":1209,"config":1572},{"href":1211,"dataGaName":1203,"dataGaLocation":1380},{"text":1214,"config":1574},{"href":1216,"dataGaName":1217,"dataGaLocation":1380},{"text":1220,"config":1576},{"href":1222,"dataGaName":1223,"dataGaLocation":1380},{"text":1225,"config":1578},{"href":1227,"dataGaName":1228,"dataGaLocation":1380},{"text":1230,"config":1580},{"href":1232,"dataGaName":1233,"dataGaLocation":1380},{"text":1235,"config":1582},{"href":1237,"dataGaName":1238,"dataGaLocation":1380},{"text":1240,"config":1584},{"href":1242,"dataGaName":1243,"dataGaLocation":1380},{"text":1245,"config":1586},{"href":1247,"dataGaName":1248,"dataGaLocation":1380},{"text":1588,"config":1589},"Sustainability",{"href":1590,"dataGaName":1588,"dataGaLocation":1380},"/sustainability/",{"text":1592,"config":1593},"Diversity, inclusion and belonging (DIB)",{"href":1594,"dataGaName":1595,"dataGaLocation":1380},"/diversity-inclusion-belonging/","Diversity, inclusion and belonging",{"text":1597,"config":1598},"Modern Slavery Transparency Statement",{"href":1599,"dataGaName":1600,"dataGaLocation":1380},"https://handbook.gitlab.com/handbook/legal/modern-slavery-act-transparency-statement/","modern slavery transparency statement",{"items":1602},[1603,1606,1609],{"text":1604,"config":1605},"Terms",{"href":1410,"dataGaName":1411,"dataGaLocation":1380},{"text":1607,"config":1608},"Cookies",{"dataGaName":1420,"dataGaLocation":1380,"id":1421,"isOneTrustButton":105},{"text":1610,"config":1611},"Privacy",{"href":1415,"dataGaName":1416,"dataGaLocation":1380},[1613],{"id":1614,"title":1615,"body":902,"config":1616,"content":1618,"description":902,"extension":1622,"meta":1623,"navigation":105,"path":1624,"seo":1625,"stem":1626,"__hash__":1627},"blogAuthors/en-us/blog/authors/pj-metz.yml","Pj Metz",{"template":1617},"BlogAuthor",{"name":7,"config":1619},{"headshot":1620,"ctfId":1621},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749659488/Blog/Author%20Headshots/gitlab-logo-extra-whitespace.png","PjMetz","yml",{},"/en-us/blog/authors/pj-metz",{},"en-us/blog/authors/pj-metz","SgW84Gu-lPq0zFzhy1aT23bZjx9kWViDG_WXzCPn04E",[1629,1637,1645],{"title":1630,"description":1631,"heroImage":1632,"category":898,"date":1633,"authors":1634,"slug":1636,"externalUrl":902},"Two front doors: Module-level access in a Django GRC app","A technical deep-dive on restructuring a Django internal tool to support two distinct GitLab teams: Security Compliance and Internal Audit.","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097663/Blog/Hero%20Images/Blog/Hero%20Images/Workflow%201800x945_2gQoQIbY9NvjLFpXtsxtXy_1750097663612.png","2026-10-05",[1635],"Donovan Felton","module-level-access-in-a-django-grc-app",{"title":1638,"description":1639,"heroImage":1640,"category":898,"date":1641,"authors":1642,"slug":1644,"externalUrl":902},"How GitLab reduced code-per-agentic-flow ratio by 45%","Learn how Flow Registry, a component-based framework that compiles YAML configurations into fully functional LangGraph flows, helped improve scalability and more.","https://res.cloudinary.com/about-gitlab-com/image/upload/v1774465167/n5hlvrsrheadeccyr1oz.png","2026-09-22",[1643],"Mikolaj Wawrzyniak","how-gitlab-reduced-code-per-agentic-flow-ratio",{"title":1646,"description":1647,"heroImage":1648,"category":898,"date":1649,"authors":1650,"slug":1652,"externalUrl":902},"Co-Create: Building GitLab with our users","How GitLab users collaborated with us to build practical product improvements in the first half of 2026.","https://res.cloudinary.com/about-gitlab-com/image/upload/v1750099203/Blog/Hero%20Images/Blog/Hero%20Images/blog-image-template-1800x945%20%2820%29_2bJGC5ZP3WheoqzlLT05C5_1750099203484.png","2026-09-10",[1651],"Isa Huerga","co-create-h1-2026",{"header":1654,"text":1655,"button":1659,"disclaimer":1662},"Start your free\n\n30-day GitLab trial\n",[1656,1657,1658],"GitLab Duo Agent Platform access","Try our most advanced features","Automate complex tasks with AI",{"text":926,"config":1660},{"href":1661,"dataGaName":929,"dataGaLocation":1170},"https://gitlab.com/-/trials/new?glm_content=default-saas-trial&glm_source=about.gitlab.com/blog/","No credit card required.",{"header":1664,"blurb":1665,"button":1666,"secondaryButton":1671},"Start building faster today","See what your team can do with the intelligent orchestration platform for DevSecOps.\n",{"text":1667,"config":1668},"Get your free trial",{"href":1669,"dataGaName":929,"dataGaLocation":1670},"https://gitlab.com/-/trial_registrations/new?glm_content=default-saas-trial&glm_source=about.gitlab.com/","feature",{"text":1396,"config":1672},{"href":1264,"dataGaName":934,"dataGaLocation":1670},1794911781517]