MCPcopy Index your code
hub / github.com/python/cpython / replace

Function replace

Lib/turtledemo/lindenmayer.py:27–33  ·  view source on GitHub ↗
( seq, replacementRules, n )

Source from the content-addressed store, hash-verified

25from turtle import *
26
27def replace( seq, replacementRules, n ):
28 for i in range(n):
29 newseq = ""
30 for element in seq:
31 newseq = newseq + replacementRules.get(element,element)
32 seq = newseq
33 return seq
34
35def draw( commands, rules ):
36 for b in commands:

Callers 1

mainFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…