Reputation: 67
What is meaning of {0}/{1}
in http://server/site/{0}/{1}/_api/web/lists/GetByTitle
Upvotes: 0
Views: 313
Reputation: 2091
The {0}/{1}
should be placeholders.
Python String format() Method:The Placeholders
Upvotes: 1
Reputation: 24827
Here, Brace characters ('curly braces') are used to indicate replacement fields within the string:
Let's say you have this string,
my_string = "http://server/site/{0}/{1}/_api/web/lists/GetByTitle"
and later in the code you can supply values for this replacement fields with string format function.
>>> my_string.format("first", "second")
'http://server/site/first/second/_api/web/lists/GetByTitle'
Here {0}
will gets replaced with the first argument to the format function(first
) and {1}
will gets replaced with the second argument to the format function(second
)
Upvotes: 1