The comments have answered the question. I'm just putting it here for completeness:
It's three fleshes (>>>).
It's used for doc test.
In PyCharm, when you rightclick it, it allows you to Run Doctest.
The syntax probably comes from the Python interactive shell.
Answer from Albert on Stack OverflowPython docstrings and inline code; meaning of the ">>>" syntax - Stack Overflow
Plugin that generates documentation using AI
Run Python Fragment in Markdown code block
python - How to auto-generate the type of a field in a docstring in PyCharm? - Stack Overflow
The statements written with >>> in the docstrings are doctests.
It lets you test your code by running examples embedded in the documentation and verifying that they produce the expected results. It parses the help text to find examples, runs them and then compares the output text against the expected value.
In your case, PyCharm has done the extra task of highlighting the python code in the docstrings. It won't affect your normal function execution so you don't need to worry about it.
Example:
Lets say I have a script named doctest_simple_addition in which i have written some doctests for add() function where some test cases gives proper output and some raises an exception. Then i can verify that my function produces the expected results by running those doctests.
doctest_simple_addition.py
def add(a,b):
"""
>>> add(1, 2)
3
>>> add(5, 3)
8
>>> add('a', 1)
Traceback (most recent call last):
...
TypeError: cannot concatenate 'str' and 'int' objects
"""
return a + b
To run the doctests, use doctest as the main program via the -m option to the interpreter. Usually, no output is produced while the tests are running. You can add the -v option and doctest will then print a detailed log of what it’s trying with a summary at the end.
Doctest looks for lines beginning with the interpreter prompt, >>>, to find the beginning of a test case. The test case is ended by a blank line, or by the next interpreter prompt.
$ python -m doctest -v doctest_simple_addition.py
Trying:
add(1, 2)
Expecting:
3
ok
Trying:
add(5, 3)
Expecting:
8
ok
Trying:
add('a', 1)
Expecting:
Traceback (most recent call last):
...
TypeError: cannot concatenate 'str' and 'int' objects
ok
1 items had no tests:
doctest_simple_addition
1 items passed all tests:
3 tests in doctest_simple_addition.add
3 tests in 2 items.
3 passed and 0 failed.
Test passed.
Note: When doctest sees a traceback header line (either Traceback (most recent call last): or Traceback (innermost last):, depending on the version of Python you are running), it skips ahead to find the exception type and message, ignoring the intervening lines entirely.
This is done because paths in a traceback depend on the location where a module is installed on the filesystem on a given system and it would be impossible to write portable tests as the path would change from system to system.
Your intuition is correct, they are to be executed. But don't worry, they are doctest strings. They won't interfere with the normal execution of a module, so everything is fine. PyCharm is just being helpful by recognizing them.
Just for example say I have a code block in a markdown file like this
import os print(os.getcwd())
I get python completions of course, but how can I make a run/debug configuration to run the code block in a terminal or the python console?
Alternatively or as a bonus, how would I run the code after opening with the "Edit Python fragment" code action?
Go to Settings > Editor > General > Smart Keys, then check the box that says Insert type placeholders in the documentation comment stub.

Per the documentation:
If configured, the documentation comment stubs can be generated with
typeandrtypetags.
Following the link:
...
- In the Smart Keys page, select the check box Insert 'type' and 'rtype' to the documentation comment stub.
Note that the documentation has since been updated, the configuration guidance currently reads:
Enable documentation comments
Open the Editor | General | Smart Keys page of PyCharm settings ⌃⌥S.
In the Enter section, select or clear Insert documentation comment stub checkbox.
Then, scroll to the Insert type placeholders in the documentation comment stub option and select or clear the checkbox as required. Refer to the option description for details.
Once you have done this, put the cursor in a parameter name in the definition, activate the Smart Keys feature (Alt+Enter, by default) and select Specify type for reference in docstring. This will insert the appropriate comment line . Similarly you can put the cursor in the function/method name and select Specify return type in docstring.