multiline string substitution in python
I am trying this out. account = "11111111111" tenant_name= "Demo" project_name= "demo" sns_access_policy = """{ "Version": "2012-10-17", "Statement": [ { "Sid": "0", "Effect": "Allow", "Principal": { "Service": "codestar-notifications.amazonaws.com" }, "Action": "sns:Publish", "Resource": "arn:aws:sns:eu-west-1:{account_id}:{tenant_name}-{project_name}-pipeline-monitoring" } ] }""" sns_access_policy = sns_access_policy.replace("{account_id}",account).replace("{tenant_name}",tenant_name).replace("{project_name}",project_name) This is doing my work, but I am looking something like f{string_substitution}. sns_access_policy = f"""{ "Version":… Read More multiline string substitution in python