add python transformation examples (#2500)

* add python transformation examples

* change tab order
pull/2508/merge
Holger Hees 2025-06-16 17:00:23 +02:00 committed by GitHub
parent 6674708f33
commit 8784b1aaf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 0 deletions

View File

@ -110,6 +110,16 @@ Note the overall syntax is the same.
::: :::
::: tab Python
The script file name is `stringlength.py` and the transformation is `PY(stringlength.py)`.
```python
"String has " + str(len(input)) + " characters"
```
:::
::: tab JRuby ::: tab JRuby
The script file name is `stringlength.rb` and the transformation is `RB(stringlength.rb)`. The script file name is `stringlength.rb` and the transformation is `RB(stringlength.rb)`.
@ -161,6 +171,14 @@ JS(|"String has " + input.length + " characters")
::: :::
::: tab Python
```python
PY(|"String has " + str(len(input)) + "characters")
```
:::
::: tab JRuby ::: tab JRuby
```ruby ```ruby