ryanVickers
January 18th, 2008, 11:23 PM
I am aware that in bash you can go
if [[ $var =~ "value" ]]; then
and this will check for if the variable "var" contains the text "value". How would one go about doing this in python?
so far, I have
if var == value:
but that is of course to check if it is solely equal to it - I want to detect if it contains it :confused:
if [[ $var =~ "value" ]]; then
and this will check for if the variable "var" contains the text "value". How would one go about doing this in python?
so far, I have
if var == value:
but that is of course to check if it is solely equal to it - I want to detect if it contains it :confused: