Hello ...  

raws <- c("field_1", "field_2",  "field_3")
paste0("['", paste0(raws, collapse="', '"), "']")

rasmus@eightforty ~ % python
Python 3.10.5 (main, Jun  6 2022, 18:49:26) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> ['field_1', 'field_2', 'field_3']
['field_1', 'field_2', 'field_3']

?

R

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to