Question: I can imagine only two cases: as 2^k approaches n, (say, if 2^k == n), then the number of steps required is n / n, or 1, so it has a run-time of O(1).

However, if 2^k is small, (say, if 2^k == 1), then n steps are required, so it has a run-time of O(n).

In essence, if 2^k can be written in terms of n, then the number of steps required is an integer, so it has a run-time of O(1). If 2^k cannot be written in terms of n, it has a run-time of O(n).

Both of these cases are worst-case; for any unknown and possibly large n, these run-times still hold. Is there any situation in which 2^k can't be qualified as much smaller than n *or* close to n?

Imagine you were to write a (possibly very long) table containing the run-times for the function for values of k such that (n / 2^k) >= 1. As k starts at 0 and increases, the run-times are O(1), but as k starts at a large value and decreases, the run-times are O(n). Is there a theoretical point at which the run-time switches from O(1) to O(n)?

Or am I simply not grasping the "main idea" of Big-O analysis?

EDIT: A linear search is assumed

Answer: 
I would suspect the `project = "Project"` variant *may* be slower because it has to lookup the content of your `project` variable each time you use it.

The other variant *might* only create one `"Project"` string because that's something python *can* intern (see for example [this question](https://stackoverflow.com/questions/17679861/does-python-intern-strings)).

However it might just be that doing the `os.path.join` for the "base path" before might be faster and you don't need to repeat the string at all:

```
project_base = os.path.join(item_number, "Project")
os.makedirs(project_base)
os.makedirs(os.path.join(project_base, 'Images'))
os.makedirs(os.path.join(project_base, 'Area Templates'))

```
Yes, the strings are the same. Try this

```
a = 'project'
b = 'project'
a is b # True

```

This is safe, since strings are immutable, and changing any of them creates a new string, so other variables holding the same value are not affected